I just wanted to share our programming skills run from the weekend. We were able to achieve a score of 315! Like most teams we will continue to strive for more. Our intake is a bit slow, but since then we have sped it up. Feel free to comment or ask questions; we would be happy to answer. A full reveal of the robot will be coming in the future once some changes are made.
Excellent job on you skills run. Stuff like this gives me hope that my robot (a single flywheel) could do something similar. I’m guessing Take back half for the speed control?
Nicely done! I was wondering how you did the movement of your robot ro precise? What sensors did you use and what kind of programming. Would love to see some sample code
void pTurn (int degree){
float gyroKp= ; // a constant used for multiplication
SensorValue[in1]=0; // initialization of gyro
int error = degree - SensorValue[in1]; // error is your wanted value (degree) minus your current sensor value taken in. it is kinda useless to do the calc outside the loop though
while(true){ // this statement should be changed based on your robots drive speed and the accuracy you are looking for
error= degree - SensorValue[in1]; // the calc that will be used in the loop to calculate error and drive speed
float pDrive = (gyroKp* error); // setting a drive motor value between -127 and 127
motor[drive1]=pDrive; // i am not sure what your drive motors were called
motor[drive2]=pDrive;
motor[drive3]=pDrive;
motor[drive4]=pDrive:
}
}
}
This function will get you most of the way there it will not be the most accurate thing, but it will definitely be good. At this moment in time we are not ready to release our actual code as skills for worlds hasn’t closed. I would be happy to help with any questions you have regarding he code or tuning your kp value. The same code can also be used for IME’s. Just change the gyro sensor value to the IME value.