biotinker / flipperzero-gpioreader

This is a fork of the `gpio` app built into the flipper, with added functionality to read GPIO inputs
GNU General Public License v3.0
33 stars 3 forks source link

Analog reader support #2

Open biotinker opened 1 year ago

biotinker commented 1 year ago

There's no first-class furi_hal interface for reading the Flipper's ADC, as far as I can tell.

The driver for the actual board does have ADC support, all of which is in lib/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_adc.h

However, I'm not particularly motivated to go pouring through 8000 lines of C to find the correct magic incantation to get numbers out of the ADC pins. I'll implement this once the Flipper folks build some higher-level support. Until then, PRs or sponsors are welcome.

Keirikl commented 1 year ago

Hi, i am currently setting up a team to make an RPM measuring unit for the flipper zero. This could be to measure winds, rpm, etc. We will use an inductive sensor that activate when a metal object is infront of it. So it is basically using some of your code to read when the FlipperZero gets an input signal. Doing some maths we can from that calculate RPM, windspeeds etc.

If you want to join and be a part of the team, please let me know.

Himura2la commented 1 year ago

https://flipc.org/anfractuosity/flipperscope

biotinker commented 1 year ago

I saw that and was looking at the code. One major downside appears to be that the ADC pins may only be tolerant up to 2.5V, will have to do some more looking into that.