GoPiGo3 with Pi4 with 32-bit Bullseye GPS

Hello everyone,
I recently updated my GoPiGo3 with Pi4 with 32-bit Bullseye using GitHub - slowrunner/GoPiGo3-Bullseye_32-bit: My non-official, non-supported setup of GoPiGo3 software on PiOS Bullseye 32-bit setup.
I have most of my sensors working. I have a Grove - GPS (Air530) and a Grove - GPS Module. They both work perfectly on standalone Pi3’s using /dev/ttyS0 using the grove.py driver software.

I tried the grove.py drivers on the GoPiGo3 and also reading the serial port directly. From what I can tell it is supposed to communicate on /dev/ttyACM0 through the red board. I have tried /dev/ttyS0 also.
I assume the serial port needs to be enabled on the Pi on the GoPiGo3.
I tried a GoPiGo with Bullseye and a Pi3, it worked just fine. /dev/ttyACM0

I don’t have a standalone Pi4 to test with.
Any thoughts?

3 Likes

DISCLAIMER: I don’t have any experience using the serial port on the GoPiGo3.

Two things to look at:

  • ls /dev/ttyA* (on my 64-bit Bookworm Pi5 - the only matching device is /dev/ttyAMA10)
  • What does python3 /home/pi/Dexter/GoPiGo3/Software/Python/Examples/gps_reading.py return?
# This example demonstrates how to use the Grove GPS sensor with the GoPiGo3.
# Connect the GPS sensor to the SERIAL port on the GoPiGo3.  This port
# is on the right hand side of the GoPiGo3.
  • as is on my system it returned:
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyAMA0: [Errno 2] No such file or directory: '/dev/ttyAMA0'
  • When I copied gps_reading.py to a local test dir and changed the serial device to /dev/ttyAMA10 it used the serial port:
python3 gps_reading.py 
Reading GPS sensor for location . . . 
If you are not seeing coordinates appear, your sensor needs to be
outside to detect GPS satellites.
Reading GPS sensor for location . . . 
2 Likes

I got the same results with the Dexter software, the program just sits there waiting.
I have only had results when using the grove.py drivers.
I pulled a Pi4 out of a project. Everything works fine with a standalone Pi4.
I have a couple of USB GPS receivers which also work fine on the GoPiGo3 Pi4. They use /dev/ttyACM0
There is something about the red board, the serial port and a Pi4.
I would like to figure it out. However, it is not a deal breaker, I just have to replace the Grove gps devices with some small USB devices.
I have a couple of these for a different project. Plug them into a Micro Usb and a USB port on the GoPiGo3, and they work very well.
https://www.amazon.com/gp/product/B0B31NRSD2/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

2 Likes

According to the Seeed Studio’s web site, (https://www.seeedstudio.com/GrovePi.html) the Grove Pi, (and Grove Pi+) use SPI for the main command-and-control interface.  Since I don’t have a schematic, I do not know which SPI channel it uses, though it’s very likely it uses SPI-0.  (Note that the GoPiGo controller board uses SPI-1, so they can, theoretically, coexist.)

Because it uses SPI communication, and the SPI interface specification is, (shall we say), “rather loosely interpreted”, (:man_facepalming:), there is a definite possibility for SPI data collisions between the robot and the Grove-Pi board in the same way that the Waveshare e-Paper displays can cause SPI communications collisions causing the robot to malfunction.

Viz.:

This research with the Waveshare displays is still ongoing as noted above.

My suggestion is to use a mutex to isolate access by the two devices.

Additional note:
The Grove-Pi(+) boards are intended to be stand-alone add-ons to the Raspberry Pi as opposed to a “stacked” board.  (So is the GoPiGo controller board for that matter.)  However, with a little care and a bit of software tweaking, they can coexist.

However, there are boards from Adafruit that are entirely i2c based boards and can be used with the GoPiGo robot without any side effects.  For example, they have Grove interface boards, Qwick interface, (which is similar to Grove, but uses a different connector and it primarily +3v instead of +5v), Real Time Clock boards for the Raspberry Pi, and a whole constellation of other interesting boards as well.  SparkFun also provides a wide variety of boards that use i2c for communication as well.

It should also be noted that Adafruit’s support, (as well as SparkFun’s support), is infinitely better than the so-called support provided by Seeed Studios.

The serial port on the GoPiGo controller board is simply a level-shifted pass-through of the Raspberry Pi’s serial port.  Because of the way it’s done, you must make sure that serial communication is enabled in raspi-config for the serial port on the GoPiGo controller board to work properly.

2 Likes