|
Post by whimickrh on Nov 5, 2017 7:07:26 GMT -8
Dear Switchdoc Labs
I have a problem with my Grove Weatherboard.
I connect the rain bucket from (J6) to the Grovepi board (D6) and use 12c (J3) to 12c-1.
This has caused no problems until very recently when I use the code below:
import time
import grovepi
# GROVE SENSORS
anemometer = 5 # Pin 5 is D5 Port. ----- Anemometer
rain_tipper = 6 # Pin 6 is D6 Port. ----- Rain_Tipper
grovepi.pinMode(anemometer, "INPUT") # Anemometer
grovepi.pinMode(rain_tipper, "INPUT") # Rain Tipper
while True:
try:
print("Port 5 D5", grovepi.digitalRead(anemometer))
print("Port 6 D6", grovepi.digitalRead(rain_tipper))
time.sleep(2)
except IOError:
print("Error")
For some reason D6 has started to give me a value of 1 when the rain bucket switch is open instead off 0
I have removed all external sensors and devices and so only the cables between the Raspberry Pi with Grovepi board and Grove Weatherboard are connected, and still the problem occurs, I have also replaced the cables, and tried on another Raspberry Pi and Grovepi, and again has the same problem.
I removed the 12c connections and the reading returned 0, I then reconnected the 12c and the result returned 1.
Have you any suggestion as what may be wrong?
Could weatherboard be at fault?
Note: I powered down the system when making changes.
Regards Michael
|
|
|
Post by SDL on Nov 6, 2017 5:58:42 GMT -8
Michael, We really don't know very much about the GrovePi. We sell a similar board called the Pi2Grover. The issue is there is a lot of software between the GrovePi and the WeatherBoard, while the Pi2Grover requires no special software. We would suggest removing the GrovePi and then connecting the WeatherBoard directly to the Raspberry Pi using Jumpers. You will have to write a small amount of software to test (See GroveWeatherPi on whether the problem is with your GrovePi or with the WeatherBoard. Can you scan the I2C bus using "i2cdetect -y 1" and post it here? With the GrovePi connected to the WeatherBoard. Best, BP
|
|