Newer issues....

im back with a new issue, lol! anyways, its my first year programming an autonomous code, or hybrid mode (im a three year veteran… funny huh). im just trying to get the remote to correspond with the robot. im trying to get a button run the motors forward, turn left, turn right, and go backwards. i will attach the code to this in a notepad file for comments and changes and such… please help!!! :confused:

autonomous code.txt (952 Bytes)


autonomous code.txt (952 Bytes)

What is the problem you are experiencing?

Jacob

That doesn’t look too bad. Two main things I notice from a cursory glance:

-You’re using the assignment operator ( = ) in your if statements. Use the double equals ( == ) if you want to test equivalency. And the eqivalency things are in the assignments. You just need to double the equals where you have one and halve it where you have two right now. (I know this error, that’s the first C mistake I ever made)

-You don’t need the extra else if. You could probably use just the else, as the if will always be true. Not a necesity, but just a style thing I noticed.

Are you having any specific problems, or just looking for a first review of the code?

i was just looking for a first review to see what others may suggest if there were any errors or anything that i may want to change or something.

Alright, then in that case, refer to my first post… That issue with the equals signs will screw everything up. But aside from that, it would be best to test it and then come back with specific problems.