Water Sensor value output freezes on GrovePi+

I have a problem:

I am using the sample grove_water_sensor.py

it constantly prints “255” until it touches water or my finger, then it just freezes and does not output anymore.

When i “Ctrl + C” it after it froze, it show this error message:

^CTraceback (most recent call last):

  • File “grove_water_sensor.py”, line 50, in *
  • print(grovepi.digitalRead(water_sensor))*
  • File “/home/pi/Dexter/GrovePi/Software/Python/grovepi.py”, line 249, in digitalRead*
  • data = read_identified_i2c_block( dRead_cmd, no_bytes = 1)[0]*
  • File “/home/pi/Dexter/GrovePi/Software/Python/grovepi.py”, line 242, in read_identified_i2c_block*
  • data = read_i2c_block(no_bytes + 1)*
  • File “/home/pi/Dexter/GrovePi/Software/Python/grovepi.py”, line 232, in read_i2c_block*
  • raise KeyboardInterrupt*
    KeyboardInterrupt

since i am not really good in python, i could use a little help, thanks already for any answers :slight_smile:

I already reinstalled and checked the “Dexter” installation, i even reinstalled the whole raspberry OS new.

(also my English isn’t quite top notch, sorry)

Is your hardware connected? Could you please provide a picture of the connection of the hardware?

Sure, here you go:

As you can see in the picture, i also have an RGB-LCD attached, which works perfectly fine.
Also earlier, i had the sensor attached on an RPI with an Base hat and there it worked just fine.

Thanks in advance :slight_smile:

Will it work if it is not connected to RGB-LCD?It could be an incompatibility problem between devices.

Hi. Thanks for the reply.

Nope, its exactly the same error if i run it without the lcd connected.

I also tried using all the “D” Ports, but its the same error for every single one.

There must be some problems here.Grove-Water_Sensor is a simple IO device.But the i2C error appears in your error. Please check our Wiki documentation.
https://wiki.seeedstudio.com/Grove-Water_Sensor/#play-with-raspberry-piwith-grovepi_plus

I read the Wiki and once again followed the Installation there step by step.
Still the exact same Error :confused:

Is it pssible, that it could be bacause of the Raspberry? Its an RPI2 Model B.

Also. On the base hat, the sensor works. I know its a stupid idea, i just ask to be absolutely sure that this is not a solution: Could i stack the Base hat and the GrovePi+ on top of each other and connect the RGB LCD on the GrovePi+ and the Water Sensor on the Base hat?

Again, thanks in advance :slight_smile: