I want to connect the Trackball Breakout to the back of the HyperPixel 4 inch square monitor. There is an IC on the back that is labeled with the same pins that are on the Trackball. Can I solder these two items using some Dupont cables, when the monitor is mounted to the Raspberry Pi GPIO header?
Depending on which version of Hyperpixel you have soldering shouldn’t be a problem: one of them should allow male Dupont cables to plug right in. The other version has a header which seems to take the Stemma JST-PH-style cable (not Stemma QT JST-SH).
There’s a guide on how to use the alternate I2C bus here.
I have this model HyperPixel
HyperPixel 4.0 Square - Hi-Res Display for Raspberry Pi – Touch
It does not have any connections on it.
Yup, so if you turn that and look at it edge-on it should be sockets for Dupont connectors. That chunk of plastic isn’t a circuit or a chip, it’s similar to the kind of header you’d see on an Arduino Uno but laid flat against the board.
As the guide I linked earlier says:
You can use some jumper jerky to connect I2C devices to your HyperPixel 4.0, using the 5-pin female header on the underside of the board. If you’re using our Pimoroni breakouts then you can solder a piece of right-angle male header on and plug them straight in, or even use one of our Breakout Garden Extender sockets and just plug them straight in.
I don’t know why they later changed to the JST-PH connector for the I2C bus, the dupont connectors are far more straightforward to use.
Duh, glad you told me that I have never seen a connector like that before. Thanks much
I have the Dupont connections made that connect the Trackball Breakout. When testing the trackball when connected directly to the Pi GPIO pins (no HyperPixel connected), the trackball functions normally. When I reconnect the Hyperpixel and the Dupont cables connect to the i2c on the back of the Hyperpixel and run the example rainbow.py I get the following errors:
pi@PiHQcam:~/Pimoroni/trackball-python/examples $ python3 rainbow.py
Fades through all the colours of the rainbow!
Press Ctrl+C to exit!
Traceback (most recent call last):
File “rainbow.py”, line 14, in
trackball = TrackBall(interrupt_pin=4)
File “/usr/local/lib/python3.7/dist-packages/trackball-0.0.1-py3.7.egg/trackball/init.py”, line 46, in init
File “/usr/local/lib/python3.7/dist-packages/smbus2-0.3.0-py3.7.egg/smbus2/smbus2.py”, line 279, in init
File “/usr/local/lib/python3.7/dist-packages/smbus2-0.3.0-py3.7.egg/smbus2/smbus2.py”, line 308, in open
FileNotFoundError: [Errno 2] No such file or directory: ‘/dev/i2c-1’
Any help on this one?
Did you run the commands at the bottom of the Hyperpixel guide for setting up the alternative i2c bus?
One thing I had an issue the last time I tried this is that for some reason the Pi didn’t create
i2c-3, it created something like
i2c-7. Try running
ls /dev | grep i2c and see which I2C buses are there. This will list the contents of the
/dev directory, where the hardware buses live, and pass them to Grep, which will filter out non-i2c buses and list just the i2c devices. You might need to use that i2c bus instead of
i2c-3 in the command.