Advertisement
Guest User

Part1 Code (Hopefully Robots syntax highlighting matches.

a guest
Feb 2nd, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Robots 1.18 KB | None | 0 0
  1. #pragma config(Sensor, dgtl12, green,          sensorLEDtoVCC)
  2. #pragma config(Motor,  port2,           rightMotor,    tmotorVex393_MC29, openLoop)
  3. #pragma config(Motor,  port3,           leftMotor,     tmotorVex393_MC29, openLoop)
  4. #pragma config(Motor,  port9,           servoMotor,    tmotorServoStandard, openLoop)
  5. //*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
  6.  
  7. /*
  8.   Project Title: Test program, please ignore.
  9.   Team Members: Dark Lord Vindictus
  10.   Date: 02/02/2016
  11.   Section: Your Mother
  12.  
  13.  
  14.   Task Description:
  15.  
  16.  
  17.   Pseudocode:
  18.     Turn it on
  19.     Wait a bit
  20.     Turn it off
  21.     Repeat once
  22. */
  23.  
  24. task main()
  25. {                                     // Program begins, insert code within braces
  26. turnLEDOff(green); // turnLEDOff (or On) is the function, the item in parentheses is the item. In this case it's the green LED defined as "green" in the Motors and Sensor setup.
  27. wait(1); // wait is the command, the item in the parentheses is the value. In this case it's 1, or one second. Use the waitInMilliseconds() command for other specifications.
  28. turnLEDOn(green);
  29. wait(1);
  30. turnLEDOff(green);
  31. wait(1);
  32. turnLEDOn(green);
  33. wait(1);
  34. turnLEDOff(green);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement