NIST Interschool Tactical Robotics Organization
< ------------------------------------------------------------------------------------------------------------------->
Page Navigation
T3 Controller/Robot Program
Homepage
T3 Controller/Robot Program

Programming
  In NITRO�s T3, the LEGO robots will be controlled using IR signals from an LEGO RCX (Robotic Command eXplorer) that has 3 TOUCH SENSORS.  Depending on what combinations of sensors are pressed, the controller will send a different numerical signal.  There will also be an RCX in the robot that receives the signals and interprets them into motor movement.  Depending on what numerical value is received, the robot will respond differently.

Challenge
  The challenge is to write, on a separate piece of paper, what each of the touch sensor combinations corresponds to which robot action.  This challenge is open to anybody.  The winner will be the first person who can tell me exactly how to control the robot by pressing touch sensors.  If they are in NITRO, they will receive bonus points for the competition.  If they are a non-NITRO member, they are eligible to be part of the competition as a robot operator.  Hint: You have to look at both the code for the Controller and the code for the Robot.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

NQC Coding for Controller (Type A) RCX

Hardware:

- Touch Sensor on Port 1
- Touch Sensor on Port 2
- Touch Sensor on Port 3
                                                                           
task main()
{
SetSensor (SENSOR_1, SENSOR_TOUCH);
SetSensor (SENSOR_2, SENSOR_TOUCH);
SetSensor (SENSOR_3, SENSOR_TOUCH);

while(true)
{
if (SENSOR_1==0 && SENSOR_2==0 && SENSOR_3==0) ClearMessage();
if (SENSOR_1==0 && SENSOR_2==1 && SENSOR_3==0) SendMessage(1);
if (SENSOR_1==1 && SENSOR_2==0 && SENSOR_3==0) SendMessage(2);
if (SENSOR_1==0 && SENSOR_2==0 && SENSOR_3==1) SendMessage(3);
if (SENSOR_1==1 && SENSOR_2==1 && SENSOR_3==0) SendMessage(4);
if (SENSOR_1==0 && SENSOR_2==1 && SENSOR_3==1) SendMessage(5);
if (SENSOR_1==1 && SENSOR_2==0 && SENSOR_3==1) SendMessage(6);
if (SENSOR_1==1 && SENSOR_2==1 && SENSOR_3==1) SendMessage(7);
}
}

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

NQC Coding for Robot (Type A) RCX


Hardware:
- Motor on Port A
- Motor on Port C

task main()
{
     while(true)
     {
     ClearMessage();

           while (Message()==0)
           {
           Off(OUT_A + OUT_C);
           }

           while (Message()==1)
           {
           OnFwd(OUT_A + OUT_C);
           }

           if (Message()==2)
           {
           Off(OUT_A);
           OnFwd(OUT_C);
           Wait(10);
           }

           if (Message()==3)
           {
           OnFwd(OUT_A);
           Off(OUT_C);
           Wait(10);
           }

           while (Message()==4)
           {
           OnRev(OUT_A);
           OnFwd(OUT_C);
           }

           while (Message()==5)
           {
           OnFwd(OUT_A);
           OnRev(OUT_C);
           }

           while (Message()==6)
           {
           OnRev(OUT_A + OUT_C);
           }

           while (Message()==7)
           {
           PlaySound (SOUND_DOUBLE_BEEP);
           }
     }
}
Rules
Competition Details
Teams
Matches
Sign the NITRO WebBoard
Contact the Organizer
Name:
Frank (Tha-An) Lin
Email:
[email protected]
You are Roboteer number:
< ------------------------------------------------------------------------------------------------------------------->
Hosted by www.Geocities.ws

1