Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Code for Liquid Flow Meter W/O Interrupts
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Code for Liquid Flow Meter W/O Interrupts

by dsblock19 on Wed Apr 01, 2020 10:03 pm

I want to use info from a liquid flow meter (https://www.adafruit.com/product/833) in a circuitpython program I wrote. I've found a few examples of python code for RPI and Arduino code, but every one uses interrupts.

I know CP doesn't have interrupts, so I was wondering if I could still get useful information from the flow meter within CP's capability?
(useful meaning info that I could use to surmise flow rate, or total flow, etc.)

dsblock19
 
Posts: 11
Joined: Tue Mar 19, 2019 5:57 pm

Re: Code for Liquid Flow Meter W/O Interrupts

by tannewt on Thu Apr 02, 2020 1:55 pm

To measure the rate you can use a PulseIn to measure the period between pulses.

We did have the idea of adding a pulse counter but haven't added it yet: https://github.com/adafruit/circuitpython/pull/1423

tannewt
 
Posts: 1692
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.