Hello all I was thinking this was already asked and fixed. As we all know that the WiringPi was discontinued but worse does not work on my Le Potato (AML-S905X-CC) I need to use the gpiod app (see below). I need help to modify or replace the current "SDL_PI_WeatherRack.py" program to use the new way of controlling the GPIO on non Pi OS.... any help or examples on how to read the wind speed. I do not use the rain gage.
This is the preferred method of operating GPIO pins.
sudo apt-get install gpiod
gpioget $GPIOCHIP $GPIONUM
gpioset $GPIOCHIP $GPIONUM=0
Replace $GPIOCHIP and $GPIONUM with the GPIO chip and unquoted Linux
gpiodetect - list all gpiochips present on the system, their names, labels and number of GPIO lines
gpioinfo - list all lines of specified gpiochips, their names, consumers, direction, active state and additional flags
gpioget - read values of specified GPIO lines
gpioset - set values of specified GPIO lines, potentially keep the lines exported and wait until timeout, user input or signal
gpiofind - find the gpiochip name and line offset given the line name
gpiomon - wait for events on a GPIO line, specify which events to watch, how many events to process before exiting or if the events should be reported to the console
Wait for events on GPIO lines and print them to standard output
Options: -h, --help: display this message and exit -v, --version: display the version and exit -l, --active-low: set the line active state to low -B, --bias=[as-is|disable|pull-down|pull-up] (defaults to 'as-is '): set the line bias -n, --num-events=NUM: exit after processing NUM events -s, --silent: don't print event info -r, --rising-edge: only process rising edge events -f, --falling-edge: only process falling edge events -b, --line-buffered: set standard output as line buffered -F, --format=FMT specify custom output format
You have to put an interrupt on the line you have connected to the wind speed. Then you measure the time between interrupts and you can determine the speed. Check out the drivers at GitHub.com/switchdoclabs
thank you I think may be searching for a sampling program or support program that uses something like the Adafruit_python_gpio.py that I can modify the table for my needs. I just need the sampling program to use the local GPIO chip pin VS the older wiringPi way and RDI.GPIO
with all your GitHub branches, can you give me a pointer where to look what project would use the older weather rack , or something that I can merge the code to get it to work. Sorry I can not afroed a Pi right now I do not need a Pi 4 for this, but I need at lease a 3B but the Raspbian OS is not happy with any non Pi bds.