When I connect the SenseHat to the pins on the red control board, the program works but it disables the other functions of the GoPiGo I know it is due to a conflict of the I2C ports. Is there a way I can resolve this issue? I saw online that I must change the config file by adding lines dtparam=i2c_vc=on
dtparam=i2c_arm=on to the config file. I did but no change.
Need more information:
the program works — What program?
disables the other functions of the GoPiGo — what functions?
Which OS? (cat /etc/os-release)
I am sorry.
This is the program I entered into Jupyter Python on the GoPiGo after connecting the Sense Hat to the 40 Pins of the red control board.
import time
from sense_hat import SenseHat
Initialize the Sense HAT object
sense = SenseHat()
print(“Starting temperature monitoring. Press Ctrl+C to stop.”)
try:
while True:
# Fetch ambient temperature in Celsius
temp_c = sense.get_temperature()
# Convert to Fahrenheit
temp_f = (temp_c * 1.8) + 32
# Print formatted results
print(f"Temperature: {temp_c:.1f} °C ({temp_f:.1f} °F)")
time.sleep(2)
It works. But when I go into the Blockly by keeping the Sense Hat on the GoPiGo and try to run forward or reverse functions, the robot will not do those tasks. I hope I could explain it better now.
Guessing your os is the GoPiGo OS since you have Jupyter and Blockly, which I am not very familiar with.
Suggest sending a note to support@modrobotics.com with the question:
“how do I configure the Raspberry Pi SenseHat for GoPiGo3 on GoPiGo OS?”
Here is my /boot/config.txt: (either copy in or attach as a file)
Here is my sense hat Jupyter program (works):
but blockly will not drive the GoPiGo3 wheels.
I have always been using the Dexter OS, Jupyter Python and Blockly. Can you please tell me how you are programming the GoPiGo robots? It seems you are having a different approach. If you can point me in that direction, I want to try that as well. I don’t think support of modular robotics will have answers for these kinds of questions (sense hat and GoPiGo).
yes, they will want you on GoPiGo Os which is the latest new and improved Dexter OS.
They are very good about answering. Give them a chance.
After investigation, the Sense Hat v1 (I don’t know about V2) uses GPIO pin 23 as an interrupt for its IMU.
This pin is also used by the GoPiGo3 to detect if there’s enough power to run the motors. Simply placing a Sense Hat on the GoPiGo ends up disconnecting the motors.
Does the sense hat use i2c or SPI?
I had a similar problem with the Waveshare e-Paper, (SPI), because the e-Paper display doesn’t properly release its chip-enable pin which causes the robot functions to freeze.
I have implemented an update that forces the Waveshare e-Paper driver(s) to release the CE pin so that the e-Paper display and the robot can coexist.
The Sense Hat uses a mix of I2C and direct pin controls. it clashes with the GoPiGo3 due to that pin. Otherwise it would work.
The config.txt I2C lines probably won’t help here: cleoqc identified GPIO23 as the clash, not an I2C address conflict. The Sense Hat v1 uses GPIO23 for its IMU interrupt, while the GoPiGo3 uses it for motor power detection. If you need both, the practical options are to check whether the Sense Hat software can disable the IMU interrupt, or use a header/adapter that does not pass GPIO23 through to the Sense Hat. Be careful: blocking that pin may also affect the GoPiGo’s power sensing, so test the motors cautiously.
I don’t need that hat. (Yet. . .)
My big beef was the shared SPI port between Waveshare’s e-Paper hat’s Channel Select pin, (CE-0), and the GoPiGo SPI Channel Select pin, (CE-1), because the Waveshare driver releases the pin, but leaves it low, (selected), so that the GoPiGo never gets the SPI channel back - which resulted in a hung robot.
In my case the fix was to force the CE-0 pin back high when it’s released so the robot could continue working. With this, I could run both the robot and the display whenever I wanted and they don’t collide. (knock! knock!)
(I also implemented an SPI mutex to prevent SPI collisions.)
![]()