Using D0 / D1 as digital port for Grove sensor


for my application, I need to connect a lot of Grove sensors, so the standard ports will probably not be sufficient.
In the post Having more Grove modules than connectors on the GrovePi I read that it should be possible to use the D0 port as additional digital port.

So, I tried to connect a Grove Temperature and Humidity Sensor Pro to the connector “SERIAL” and read the sensor values on pin 0.
[temp,humidity] = grovepi.dht(0, 1)
But this does not work.

My question is:
Do I need to change something on the GrovePi firmware to be able to use port D0?
Do I need to use a different pin number?
Or is it not possible to use the temperature and humidity sensor on this port as you need to write and read on the port to communicate with the sensor?

Thanks in advance for your help.

Can you first make sure that the sensor works on another port like D4 and if that does work, can you try changing the port to D0 and D1 when you connect it to the Serial port.

I’ll try it out in some time and would let you know how it goes for me.


Thanks for your reply.

I’ve already checked the DHT sensor on normal digital ports and it works great.
In my code on the RasPi, I changed the pin configuration accordingly:
for port D4, the code is pin = 4
so for port D0, I set pin = 0
But pin = 0 does not work. I tried as well pin = 1, but it does not work either.

I assume that you anyway cannot use pin D1 because the D1 pin of the SERIAL connector is connected to the white wire of the sensor which is not used.

With regard to using D0 as general digital port, I am wondering if you need to disable the serial function somehow or if you need to reconfigure the pin for input/output.
When working as serial interface, pin D0 seems to be the receive pin (labeled RXD in schematic). So, I was wondering if the pin can only work as input and therefore not communicate with the DHT sensor.