Guest User

Untitled

a guest
Jun 4th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1.  
  2.         public void Run(IBackgroundTaskInstance taskInstance)
  3.         {
  4.             //Build the LED sensor that is
  5.             //plugged into the GrovePi at pin D2:
  6.             var led = _deviceFactory.Led(Pin.DigitalPin2);
  7.            
  8.             //Grab the sensors current state. At this point
  9.             //it should = SensorStatus.Off
  10.             var currentState = led.CurrentState;
  11.            
  12.             //Turn LED on
  13.             led.ChangeState(SensorStatus.On);
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment