I wanted to read data from Round Force Sensor FSR402. Unfortunately on Grove wikipage there’s no sample code for Raspberry Pi & GrovePi+ but I found other analog sensor as a reference: Grove Gas Sensor MQ2. At the end of the day I created code like this:
sensor = 0
value = grovepi.analogRead(0)
The output of this code is:
Probably analogRead is wating for a data and cannot get them. I plugged sensor into the A0 port. Could you please help me to figure this out?
Disclaimer: I am not DI and do not own a GrovePi
Perhaps compare to this sample (it looks like 14 for A0 rather than 0?). https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_analog_read.py
Thanks for the link you provided. Unfortunately I can’t test this solution now because I burned my Raspberry week ago. I found a link on the web which confirms your theory - https://www.dexterindustries.com/GrovePi/engineering/port-description/
On an Arduino Uno (same ATmega328 chip) the digital pins are marked as D0-D13 and analog pins A0-A5 .
The analog pins are actually aliases for digital channels.
A0 = D14
A1 = D15
A2 = D16
A3 = D17
A4 = D18
A5 = D19
From the other hand in the “official documentation” for Grove Eagleye 530s (http://wiki.seeedstudio.com/Eagleye_530s/#play-with-grovepi) which is analog sensor you can find this code:
# Connect the Grove Rotary Angle Sensor to analog port A0
potentiometer = 0
# Connect the LED to digital port D5
led = 5
For sure without raspberry pi we cannot check those theories
Are you absolutely sure it is fried? There is a “self healing” thermal fuse somewhere in the power circuitry - I have heard of resurrected Raspberries