Mon Jul 27, 2020 9:32 am
The lightening symbol does indicate that your Pi is not being feed enough power. I always use the official Raspberry Pi power supplies because I know they provide enough power. If you are using some other power supply, it might not output enough amps. Or the usb cable might not be thick enough to carry the power to you Raspberry.
Once you have improved the power supply, you can return to checking your sensor. The anemometer is just a reed switch that gets closed twice each time the cups complete a 360 degree rotation. If you Rotate the cups slowly by hand even without electrical power, you will probably hear a slight “click” as the magnet passes the switch.
The wind vane makes a lot more clicks when you rotate it because there are 8 reed switches.
So thinking of the anemometer as just a switch, you don’t have to write a complex program to calculate wind speeds right away, Just write the absolute minimum to detect the closing of the switch. If that works then you know your wires are connected correctly. If that does not work, either your program or connections are incorrect.
If at that stage you are convinced your program is right, you can improvise a switch using your breadboard and a resistor. Disconnect the anemometer and connect two spare wires instead. Then touch the bare ends of those wires onto either end of your resistor. That will serve as a crude switch and your program should detect that the switch was turned on.
Testing that way is more visible than testing with a reed switch hidden inside the anemometer. It also precludes the slight but not impossible risk that your anemometer is not actually closing the reed switch. If you have a multi meter you could check the anemometer with that.
I hope this helps a bit.