Can someone help me put my code into the template because i don’t know where what goes where??? Here is my code
nleos.zip (3.19 KB)
This is a little beyond the scope of normal tech support, however, assuming you want it in the competition template I will have a look later and take a stab at it for you.
Here is a version of your code placed into the competition template, I have a few comments.
The LCD chooser will wait for the center button to be pressed, if you forget to do that your robot will not enter the autonomous or usercontrol phases of the competition, consider adding a check for the robot being disabled and skip this code if it is not. see the bIfiRobotDisabled flag, or add a timeout (exit after 10 seconds or something like that).
You are controlling the arm motors in two different places. The second set only runs if you are not using the claw motor. I see what you were trying to do by using the arm encoders, when you finish off that implementation it will not work as currently written, you should only ever send control values to a motor once each time around a while loop. So you probably want to remove the first set of control statements for the arm and then move the second set outside of the “else” statement of the claw control.
You had arm encoders being cleared every time around the while loop, this probably happened when you removed that second nested while a couple of days ago that was giving problems with the battery display. I moved those two statements.
nleos_revised.zip (3.74 KB)