Hi,
Right now to turn left there are two options available:
left(): Rotate the right wheel forward and stop the left wheel and the GoPiGo turns left.
left_rot(): Rotate the right wheel forward and rotate the left wheel back and the GoPiGo rotates left.
It’s similar for right too.
Isn’t rotating clockwise means to rotate right and rotating ccw means to rotate right? If it does, then you can use those function. Sorry if I got something wrong.
If it does not, then there are not other rotation functions and you are pretty correct in figuring out how to change it in the firmware.
I’ll just outline what all changes you’ll have to make to get it to work:
It’s a bit long and cumbersome process but once you get the hang of it, it is much better.
Also, be careful when you upload the code. Make sure that the motor is disconnected because one of the SPI lines is connected to the Motor Controller chip and you might burn your GoPiGo if you are not careful.
thanks for your thorough reply. i got busy, and i’m now just getting back to this.
anyway, i’ll try using your instructions soon. what i’m looking to do is to be able to independently control the direction and speed of rotation of each wheel/motor. i wouldn’t be using the gpg at a mobile robot, but for a video installation project where i need to control the rotation of one or more surfaces that will be screens for video projections.
i’ll let you know how it goes.
thanks again,
tracy
p.s. i read on another topic that the tape on the rotation encoding wheels should not be removed? true? if so, i missed that detail and removed the tape. the gpg seems to work ok though.
Hi Tracy,
We’ll let you know as soon as the firmware is ready. As for the encoders, they are used with PID algorithm to make sure that both the motors run at the same speed. If you face any problems with the motors not working properly, just use masking tape to cover the encoder.
Finally had time to try modifying the firmware as you suggested. I believe that I’ve made all of the needed edits to the files (gopigo.py and fw_ver_11.ino), but it doesn’t work.
I’ve created a Python test script to test the changes, and the new commands seem to be recognized (no errors or warnings when i run the test), but the gpg doesn’t respond. My test is an edited version of the basic_test_all.py script. All of the other original commands work (i.e., “left()”, “fwd()”), but my new commands seem to be ignored.
I think the problem may be that a new hex file fw_ver_11.cpp.hex is has not been generated with my changes? What do you think?
If so, how do I update fw_ver_11.cpp.hex with my changes? Sorry, I’m a Python newbie.