Hi,
I recently purchased a SparkFun weather meter (https://www.sparkfun.com/products/8942) and am following the tutorial at BC Robotics to build a weather station - https://www.bc-robotics.com/tutorials/r … on-part-2/
The temperature, humidity and pressure sensor all work fine, but whenever I connect the wind direction and speed to the board, I get a ‘Not connected’ error message. However, if I rotate the wind direction into a specific direction, I get one signal; in this instance, a reading of ESE.
I was wondering if anyone knew of a way to test whether any item is potentially faulty.
Thanks so much in advance!
Hi welshkiwi,
I am not familiar with the BC Robotics board or tutorial but from your description and a brief look at the code, it looks like you are at least getting wind direction when you update that position. Try rotating it to specific positions and check that it updates. For the wind speed, the code is watching for the number of “ticks” from that digital pin whenever the anemometer rotates so try spinning the anemometer and see if it updates with a speed reading. Also, make sure the RJ-11 connector from the anemometer is fully connected to the port on the bottom of the wind vane.
To check outside of the code, you can simply monitor the analog pin the Wind Vane is connected with an analog read function to watch for changes when you move the position of it. For the anemometer, you can use a digital counter for the GPIO pin it is attached to in order to monitor each time the momentary switch inside the mechanism gets triggered to see if it is working properly.
If you continue to have issues with the Weather Meters, please attach a few photos of your connections to your reply and we can troubleshoot further.
Hi Mark,
Thanks so much for taking the time to respond, I really appreciate it.
I’ll check out your recommendations. However, I did spin the anemometer and nothing was registered. I also rotated the wind direction vane slowly and the only time it registered was the ESE direction.
Quick question, what do you mean by, “you can use a digital counter for the GPIO pin”?
Once again, thanks so much!
To count the “ticks” you can do something similar to [this button example and then modify it to add a count function like this:
from gpiozero import Button
sensor = Button(Wind Speed GPIO pin)
count = 0
while True:
if sensor.is_pressed:
count += 1
print(count)
Just make sure to set the Wind Speed GPIO pin to the I/O pin the wind speed counter is set to and you should be able to test whether or not that switch inside the anemometer is working. One quick question, have you tested the Rain meter as well? Is that working?](2. Basic Recipes — gpiozero 2.0.1 Documentation)