Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Run(IBackgroundTaskInstance taskInstance)
- {
- //Build the LED sensor that is
- //plugged into the GrovePi at pin D2:
- var led = _deviceFactory.Led(Pin.DigitalPin2);
- //Grab the sensors current state. At this point
- //it should = SensorStatus.Off
- var currentState = led.CurrentState;
- //Turn LED on
- led.ChangeState(SensorStatus.On);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment