Last active
November 7, 2019 05:59
-
-
Save pinglunliao/456b3734329eec6a34657cf3c3824617 to your computer and use it in GitHub Desktop.
RobotC for NXT. FYI: https://yunlinsong.blogspot.com/2019/06/robotc-for-nxt.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task main() | |
{ | |
// Moving Forward | |
motor[motorC] = 100; | |
motor[motorB] = 100; | |
wait1Msec(1000); | |
// Moving Backword | |
motor[motorC] = -100; | |
motor[motorB] = -100; | |
wait1Msec(1000); | |
// Turn Right | |
motor[motorC] = 100; | |
motor[motorB] = -100; | |
wait1Msec(1000); | |
// Turn Left | |
motor[motorC] = -100; | |
motor[motorB] = 100; | |
wait1Msec(1000); | |
// Stop | |
motor[motorC] = 0; | |
motor[motorB] = 0; | |
wait1Msec(3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment