HTML

SourceFile003.c

Dec 19th, 2017
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #pragma config(Sensor, in1,    sensor,         sensorReflection)
  2. #pragma config(Sensor, dgtl1,  led,            sensorLEDtoVCC)
  3. #pragma config(Motor,  port1,           motor,         tmotorVex393_HBridge, openLoop)
  4. //*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
  5.  
  6. task main()
  7. {
  8.  
  9.     while(1 == 1)
  10.     {
  11.             if(SensorValue(sensor) < 400)
  12.             {
  13.             turnLEDOn(led);
  14.             }
  15.             else
  16.             {
  17.             turnLEDOff(led);
  18.             }
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment