Created
December 5, 2014 13:45
-
-
Save andreareginato/a74b51631f13c42515c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void RunLightMonitor() { | |
// Get onboard led reference | |
this._ledOnBoard = new OutputPort(Pins.ONBOARD_LED, false); | |
while (true) { | |
LelylanConnection(); | |
// read onboard led status | |
bool ledStatus = this._ledOnBoard.Read(); | |
// publis led status on server lelylan | |
if (readState != previousState) { | |
LelylanPublish(currentState ? "on" : "off"); | |
} | |
previousState = readState; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment