View Single Post
  #4   Spotlight this post!  
Unread 30-11-2012, 23:48
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Programming ordeal

"turn red on" and "turn red off" aren't actual commands; you have to determine what the interface between the NXT and the LED is. If it's the same as a lamp, you control it like this:
Code:
motor[motorA] = 100; // Turn port A lamp on
motor[motorA] = 0; // turn port A lamp off
Also, the code you have will respond to sensor changes, but will ignore controller input. To learn how to interact with game controllers, look at the FTC example programs provided with RobotC.
__________________
I code stuff.