After some thorough tests, we found that the Ergo Jr robot was working fine on a Raspberry Pi 3 but was very slow when performing movements. The short answer: we were using a software UART, less performant than the hardware one (which is used for bluethooth by default). You can read the whole explanation from the article called “Configuring The GPIO Serial Port On Raspbian Jessie Including Pi 3” on Spellfoundry.
We’ve received feedback from users who had trouble using a Raspberry Pi 3 for their Ergo Jr robot.
Basically, some changes between Raspberry Pi 2 and 3 to the serial interface prevent the current Ergo Jr code from working on a Raspberry Pi 3. Good news, solving this is rather easy, and we prepared a working image for the Raspberry Pi 3 available for download. Make sure to backup your Jupyter notebooks or Snap! projects before flashing your SD card!
If you want to upgrade your existing robot or want to switch from a Raspberry Pi 2 to a Raspberry Pi 3, the provided instructions below show how to do this.
You should note that depending on how one has customized their configuration, the following instructions may not work. Should that happen, please share your problem by posting in the forum under the support category.
Make sure the official
raspi-config is installed:
sudo apt-get update && sudo apt-get install -y raspi-config
Launch the utility
sudo raspi-config, then enable the camera and disable the
Advanced Options > Disable shell and kernel messages on the serial connection option.
Make sure the
/boot/config.txt file contains the
dtoverlay=pi3-miniuart-bt lines, or add these otherwise.
Update poppy_ergo_jr python dependency so it looks for
/dev/ttyS0 instead of
/dev/ttyAMA0 (this is what makes communication stall):
If you updated poppy_ergo_jr with the deleted statement above, you need to revert it:
sed -i -- 's/ttyS0/ttyAMA0/g' /home/poppy/miniconda/lib/python2.7/site-packages/poppy_ergo_jr/configuration/poppy_ergo_jr.json
Restart the Raspberry Pi 3, and enjoy robotics!
Photo credit: desmodex