I was reading:
(along with the other docs)
and I am trying to understand the pin numbers and the actual ports. For example, port D3 has pin 3 and 4? And then port D4 has pin 4 and 5?
So if I write to pin 4, that means both port D3 and D4 will be “on”?
I’m really new and just trying to understand how all of this works and set up.
Yes you are right, each of the digital and analog ports on GrovePi have one pin overlapping with its next port, ie ports D3 and D4 have, digital pin 4 in common. While most of the sensors use one pin,this is done to support some sensors such as joystick which use two pins. In such cases you should make sure that the next port doesn’t use the pin, which is in common with its previous port.
Please lets us know if this helps,
Thanks for the confirmation. I didn’t realize that some sensors needed two, but all of that makes sense now. It was causing a little confusion when I initially read the docs, and even more so when I was wiring up my own sensors.
Was this mentioned in docs anywhere? I’m interested to know if I missed some important docs.
Its good to know that the explanation helped, sorry for not mentioning it explicitly in our documents, will update it soon. All the documents related to GrovePi can be found here .