Wednesday, October 19, 2016
GrovePi Mandatory Reading
Hey you! Yeah, you, I'm looking at you. Are you using a Grove Pi to prototype, test, or even planning on implementing it in your project? Have you read any documentation on it? What if I asked you which pins are being used in the Pi GPIO header and which ones were free, would you know the answer?
Based on some of the looks I got last week in class when I asked questions about how the Grove Pi communicated with the RPi and how it talked to its sensors, I think it's time anybody within 5 feet of one of these awesome boards looks at how they work. Even a basic understanding of how it works and what pins go where will make your life easier when you troubleshoot your hardware.
Lets start with what the GrovePi is. The grove Pi is an Arduino Uno with a bunch of plugs. That's it. If you don't know what that is, it's okay - it's essentially another little computer, a bit less powerful than your Pi but really good at talking to sensors. This is what your GrovePi looks like without all the handy connectors and pin headers:
It can run alone if need be, though in the case of the GrovePi, it needs to talk to something in order to be useful. How does it do that? It uses a series of GPIO pins on the RPi. The SPI pins GPIO 8,9,10 and 11 are connected directly to the GrovePi and are used to update new firmware on the GrovePi. The UART GPIO 14 and 15 are connected to a Grove Port and can be used to connect a UART sensor directly to the Raspberry Pi. The actual communication between the GrovePi and the RPi happen over I2C lines GPIO 2 and 3. Aside from those pins, the rest of the pins on the RPi GPIO header should be open for you to use for other functions.
Let's take a look at the GrovePi pinouts now. Below is a diagram of what each pin does on the GrovePi. If you're interested in a more in depth discussion of these capabilities, have a look at the documentation page.
You will see two types of I/O ports, digital and analog (analog port numbering convention for the Arduino is 'A#') Remember, these pins don't map directly to the RPi GPIO, they are separate and only belong to the Arduino (They are accessible from the RPi via the I2C communication bus). Aside from the built in python libraries for the grove sensors that you are already familiar with, each of these pins can be controlled individually, which gives you a lot of power over what they can do. You can even run servos from here (PWM pins)! Sorry for the misinformation I have spread earlier, I didn't look at the specs before coming in to help. If you want to learn more about that, look at the documentation link above.
If you're running other hats on your Pi, check this awesome interactive site - it lets you know which pins are being used for a number of popular hats, along with a general description of what each RPi GPIO pin does: http://pinout.xyz/pinout/
Subscribe to:
Post Comments (Atom)




No comments:
Post a Comment