I have an old GoPiGo 2 lying around. I loved it and it was a great bridge to advanced RPi robotics, which I’ve moved on to. However, there’s a bunch of sensors on it that I’d like to use in my latest RPi robot project. They are as follows:
Line following sensor
I’ve seen the solder holes and contact pads, but I have a few questions:
- How do I change the I2C logic level to 3v? I saw the solder pads to change some settings, but I’m not sure how they work. (Color sensor).
- What code would I use? (All of them)
- For the I2C ones, is there a way to do I2C addressing? I have an I2C board already on there, so I don’t want any interference.
Thanks in advance,
Those sensors and libraries can be used with a simple RPi but you will need to sacrifice one cable.
Or you can order these:
Then you can connect them to the I2C pins on the Raspberry Pi
Thanks for the fast reply. I actually have a few of those cables. How do I code the sensors? Is there a pin map for the cables?
Google gave me this
And you can install the libraries as such
curl -kL dexterindustries.com/update_sensors | bash
Hope it helps!
I’m still a little confused as to how to code the sensors. I ran the setup script, and everything went as planned. However, I peeked at the class files for the line follower and saw a lot of references to the GoPiGo’s ports (on the red PCB). How do I establish a direct connection using the pins on the Pi and read data from the sensors?
have you looked at the documented examples here: https://di-sensors.readthedocs.io/en/master/examples/index.html
They should be independent of the robot (or lack thereof). It’s best to use
"RPI_1" as your bus when you don’t have a robot.