Anyone Know much about Robotc?

Don't really have a code question but this is my code. This is my first robot. It is called square bot for obvious reasons. I am taking rop robotics at my school and i know my teacher really well and he knows me really well and for this first challenge he did not allow me to use sensors for the wheels so this is the rough part of the testing. we have class time to work out the trial and error part of the timing on wednesday and thursday.

anyone know some useful places to go for robotc info? the website is really nicely done and packed full of information so i cant really ask for much else, but still, any other places?


the challenge is to get as close to an X that is 16 feet away and make 4 left turns and 4 right turns in the process.

initially what we plan to do is go straight to the X and then make 4 point left and right turns. and he said that is perfectly legal. and granted that i am the only one in the class with programming knowledge... we are more then prepared for the challenge that is next monday. most groups are still figuring out how to make the motors work much less actually coming up with a plan for the challenge. it has to be entirely automatic.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma config(Motor,  port2,           frontRightMotor, tmotorServoContinuousRotation, openLoop, reversed)
#pragma config(Motor,  port3,           backRightMotor, tmotorServoContinuousRotation, openLoop, reversed)
#pragma config(Motor,  port4,           frontLeftMotor, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor,  port5,           backLeftMotor, tmotorServoContinuousRotation, openLoop)

//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
task main()
{
     while(vexRT[Btn5U] == 0)
       //right first trigger not press
     {}
     while(vexRT[Btn5U] == 1)
       //right first trigger press
     {
          motor[port2] = 63;
          motor[port3] = 63;
          motor[port4] = 63;
          motor[port5] = 63;
          wait1Msec(250);

          motor[port2] = 0;
          motor[port3] = 0;
          motor[port4] = 0;
          motor[port5] = 0;
          wait1Msec(500);

          int Left = 0;

          while(Left != 4)
          {
               motor[port2] = 63;
               motor[port3] = 63;
               motor[port4] = -63;
               motor[port5] = -63;
               wait1Msec(250);

               motor[port2] = 0;
               motor[port3] = 0;
               motor[port4] = 0;
               motor[port5] = 0;
               wait1Msec(500);

               Left = Left + 1;
          }

          int Right = 0;

          while(Right != 4)
          {
               motor[port2] = -63;
               motor[port3] = -63;
               motor[port4] = 63;
               motor[port5] = 63;
               wait1Msec(250);

               motor[port2] = 0;
               motor[port3] = 0;
               motor[port4] = 0;
               motor[port5] = 0;
               wait1Msec(500);

               Right = Right + 1;
          }
     }
}
Topic archived. No new replies allowed.