HTML

blink.c

Oct 30th, 2017
272
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #pragma config(Sensor, dgtl1,  red,            sensorLEDtoVCC)
  2. #pragma config(Sensor, dgtl2,  yellow,         sensorLEDtoVCC)
  3. #pragma config(Sensor, dgtl3,  green,          sensorLEDtoVCC)
  4. //*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
  5.  
  6. task main()
  7. {
  8.     int count = 0;
  9.     while (count < 10)
  10. {
  11.     turnLEDOn(red);
  12.     turnLEDOn(yellow);
  13.     turnLEDOn(green);
  14.     wait(.5);
  15.     turnLEDOff(red);
  16.     turnLEDOff(yellow);
  17.     turnLEDOff(green);
  18.     wait(.5);
  19.     count = count + 1;
  20. }
  21. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment