Tuesday, March 30, 2010

Delta Autonomous Mode

Ok so I, of course, picked up the broken computer so I was unable to input Delta's autonomous code, but here it is. This is the code from the strategy that they made me:
D = our half (width-wise)of the arena
d = D/2
L = entire length of arena
autodrive(D, BEHIND, 127)
//** = add wait statement
autobasket(LIFT,127)
**
autobasket(DOWN, 127)
autodrive(d, FORWARD, 127)
**
autoturn(90deg, LEFT)
**
autodreeder(INTAKE, 127)
autodrive(~L/3, FORWARD, 127)
**
autodreeder(OFF, 0)
autodrive(~L/6, BEHIND, 127)
**
autoturn(90deg, RIGHT)
**
autodrive(~d, BEHIND, 127)
**
autobasket(LIFT, 127)
**
autobasket(DOWN, 127)

task complete

Delta RC Problem

Ok here we go:
Delta:
the feeder still doesn't work on RC control. It will work perfectly in one direction but then starts to..."sputter" as if the two motors are fighting each other.
The code for that part is:
while(true)
{ blah
blah
blah....
//Feeder button
if(Butn6U ==1)
{
motor[port8] = 127;
motor[port9] = 127;
}
else
{
motor[port8] = 0
motor[port9] = 0
}
if(Butn6D ==1)
{
motor[port8] = -127;
motor[port9] = -127;
}
else
{
motor[port8] = 0
motor[port9] = 0
}
}
I have tried the following with no results:
1. Motor 8 is a reflected motor so I tried switching the reflected motor to motor 9
2. switching the negative from the first if statement to the second if statement(when I do this the feeder spins perfectly in the opposite direction, but then struggles in the same direction it was working fine in before I switched it)
3. switching out the motors physically...well technically Mo did it
4. making none of the motors reflected
5. making both motors reflected
6. checking to make sure the motors are in the correct ports
7. changing the battery
8. making one of the powers negative in each if statement
9. changing the button from the "shoulder" button to the ch7 or ch8 on the face of the remote control

I can't figure this out because I have the exact same code on the basket, except of course with different ports, and the basket works fine

Saturday, March 27, 2010

Ok so Delta's basic programming is done, but something is wrong with the code on their feeder and I can't figure out how to fix it