Skip to content

Instantly share code, notes, and snippets.

@karanrajs
Last active August 8, 2016 03:06
Show Gist options
  • Save karanrajs/84fe2e3fe848111e760c2a72c4bf16d3 to your computer and use it in GitHub Desktop.
Save karanrajs/84fe2e3fe848111e760c2a72c4bf16d3 to your computer and use it in GitHub Desktop.
trigger LEDlights on FeedItem (after insert) {
for(FeedItem fdi : Trigger.New){
if(String.Valueof(fdi.body).touppercase().contains('#LIGHTON') ){
littleBitsLEDhelper.turnOnLED();
}
else if(String.valueof(fdi.body).touppercase().contains('#LIGHTOFF')){
littleBitsLEDhelper.turnOffLED();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment