Has anyone managed to convert PIO commands like below to python Grove Pi digital input.
GPIO.add_event_detect(pinAnem, GPIO.RISING, callback=self.serviceInterruptAnem)
Which I believe detect’s a pulse from an magnetic switch from a Anemometer connected to pinAmen (GPIO Numbering Mode GPIO.BCM pin23).
Am I right in thinking that once a pulse is detected the program goes to :
where the pulse is counted.
If I am right would the Anemometer to digital port D5
pinAnem = 5
if grovepi.digitalRead(pinAnem) == 1:
Sadly when I try this approach nothing happens.
Can some suggest how I should code in python so the GrovePi Digital Ports are used.
What I am trying to achieve is to tweak Switchdoc Labs Weatherrack Python code https://github.com/switchdoclabs/SDL_Pi_Weather_80422
Hoping someone can help