Is overclocking possible without IO errors?

I’m working on controlling a GoPiGo (Raspberry Pi 2 B) with an Xbox 360 controller based on code from this post.

When the I move the joystick around a lot, it seems as though the commands may be piling up faster than the Pi can process them. I read about the included overclocking presets on the raspberry pi and figured it would be a good optimization to try. When I did, all of the commands from the gopigo library that I tried returned -1 (IOError).

I’m guessing that it affected the bus speeds making it unable to communicate with the gopigo board. Has anyone looked in to overclocking a Pi with GoPiGo or otherwise be able to shed any more light on the situation?

We haven’t tried overclocking the Pi and testing the I2C connections to see if the I2C errors do go away but most probably it won’t. the I2C errors come from I2C bus itself and might be there because of a lot of reasons and we haven’t been able to solve it. The easiest way to make them go away is to use a try except block and cat the IOErrors.


I’m using the gopigo python library, so it already has try except blocks to catch the IOErrors and return -1 which I catch and print. Unfortunately, when I overclocked the pi, every single function in the gopigo library that I tried returned -1 every single time I called it.

Hey Crusunik,

This is a pretty advnaced question, as Karan mentiones, we haven’t tried to overclock the Pi before, but sounds interesting. You might be speeding up the hardware clock, and we could tell if you placed a logic analyzer on the I2C pins. You might also be speeding up your delay (if you’re constantly pinging the hardware over I2C with no rest, you can cause errors described).


Unfortunately, I’m at an internship in an office and don’t have a logic analyzer. I did try adding a scaling factor to the delays and tried various scales, but it didn’t seem to have any effect.

I was later able to speed up the program by reversing the command queue and skip all the earlier commands of the same type, so my root problem is solved.

Hey Crusunik,
Thanks a lot for trying this out. We have been running some tests at our end and have been trying to get the IO Errors down to as less as we can and had some success recently. We’ll be updating the code in the coming weeks so do check the forums so that you can try out the updated code.