Troubles with Flow Sensor YF-S402 on a Raspberry PI + GrovePI+

Hello DexterIndustriesforum-users,

I am Tycho from Holland, I have got a flow sensor which won’t work on a Raspberry PI + GrovePI+.
It is the Flow Sensor YF-S402 G1/8 (https://www.seeedstudio.com/item_detail.html?p_id=1346).

I have tried it with the example/library from GrovePI (https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_flow_read.py) of his bigger brother the YF-S402 G1/4 (http://digitalmeans.co.uk/shop/water_flow_sensor-g25-yfs402).

I also have tried to directly read the digitalPort (2 -> also connected to D2), then I get “0” and when I blow trough it some “1” go trough a spam of “0”. From within Python I can’t read it fast enough to see all the pulses on the GrovePI+ port…

Thank you in advance,
Tycho
Holland

Hey Tycho,
The flow sensor needs firmware version 1.2.5 on the GrovePi. Can you run this https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_firmware_version_check.py and find out what firmware version you are on, if it is 1.2.2 upgrade to 1.2.5 by running avrdude -c gpio -p m328p -U flash:w:grove_pi_v1_2_5.cpp.hex from the folder here: https://github.com/DexterInd/GrovePi/tree/master/Firmware/Source/v1.2/grove_pi_v1_2_5. Do check the firmware version after the update and if it still does not work, can you run the troubleshooting script for the GrovePi : https://www.youtube.com/watch?v=ZMadpIEYq5o and upload log here.

-Karan