flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Support for analog input/output

Open Milk-Cool opened this issue 2 years ago • 4 comments

Description of the feature you're suggesting.

Since a lot of GPIO sensors/input devices/etc. use analog input/output, it would be nice to have the Flipper Zero work with analog i/o out of box. Right now in the furi core libs there are no methods implementing this.

Anything else?

No response

Milk-Cool avatar Jan 17 '23 07:01 Milk-Cool

I have an example with an analog input, we plan to port it to the firmware.

DrZlo13 avatar Feb 11 '23 01:02 DrZlo13

hi

Just wondering if there has been any update on this capability? it would be really useful.

Thank you

sulph68 avatar Sep 06 '23 02:09 sulph68

@sulph68 available throw ST LL_HAL

skotopes avatar Sep 06 '23 06:09 skotopes

@sulph68 available throw ST LL_HAL

Can u tell where ? Im trying to find the file

khalifa007 avatar Dec 10 '23 00:12 khalifa007

I have an example with an analog input, we plan to port it to the firmware.

Howdy! I’m trying to access the ADC and it seems like the firmware got rid of the access point you used in your example code, do you have any tips for accessing it now? Thanks so much!

ecopsychologer avatar Mar 26 '24 14:03 ecopsychologer

I'm also wondering. It seems things have changed some since your example app. Thanks!

MatthewKuKanich avatar Apr 01 '24 04:04 MatthewKuKanich

Howdy! I’m trying to access the ADC and it seems like the firmware got rid of the access point you used in your example code, do you have any tips for accessing it now? Thanks so much!

@ecopsychologer it looks like the stm libraries are now inaccessible for flipper zero applications. someone needs to at least make a wrapper for adc functions that would be accessible from an app.

Milk-Cool avatar Apr 06 '24 08:04 Milk-Cool

@ecopsychologer it looks like the stm libraries are now inaccessible for flipper zero applications. someone needs to at least make a wrapper for adc functions that would be accessible from an app.

Ahhh that makes so much sense! I bought myself a similar board to what the flipper was built on, and am now having to navigate the the adc/hal functions and such anyways on that side, so if I figure anything out I'll be sure to pass it along and disseminate that info as widely as possible

ecopsychologer avatar Apr 06 '24 12:04 ecopsychologer

My current workaround has been using the rogue master firmware which it seems did not quite yet phase out adc support. I don't really know how to build for specific firmwares using ufbt but I’m pretty sure there's a way. That may be good enough until some folx savvier than I bring the lower level functionality back to the firmware

ecopsychologer avatar Apr 06 '24 12:04 ecopsychologer

@Milk-Cool Im realizing now in my research into creating wrappers as you mentioned (I’m an amateur) that it's very possible that what I saw in the flipperscope repo (and application but if you search that you'll find the source code) is in fact the wrapper for the hardware level libraries. If you look into that project, it has folders with different files with libraries that it seems the author uses to access adc. My first attempt to understand it wasn't successful but maybe two brains are better than one? I'd be down to discuss on a forum or discord or somewhere that isn't gonna ping the lovely folx working on the firmware.

Thoughts? Best, J

ecopsychologer avatar Apr 06 '24 12:04 ecopsychologer

@Milk-Cool Im realizing now in my research into creating wrappers as you mentioned (I’m an amateur) that it's very possible that what I saw in the flipperscope repo (and application but if you search that you'll find the source code) is in fact the wrapper for the hardware level libraries. If you look into that project, it has folders with different files with libraries that it seems the author uses to access adc. My first attempt to understand it wasn't successful but maybe two brains are better than one? I'd be down to discuss on a forum or discord or somewhere that isn't gonna ping the lovely folx working on the firmware.

Thoughts? Best, J

sorry, don't have a flipper with me rn :( so no way to test anything

Milk-Cool avatar Apr 06 '24 12:04 Milk-Cool

@Milk-Cool thats all good, I made a repo called flipper-zero-adc-wrapper where I'll be trying to figure stuff out. Regardless of your ability to test, I'd definitely appreciate any help or ideas that come to you if you wanted to give it a glance. It's early stages but I’m hoping it'll become something handy for folx like us haha

ecopsychologer avatar Apr 06 '24 13:04 ecopsychologer

https://github.com/flipperdevices/flipperzero-firmware/pull/3583 coming next release

skotopes avatar Apr 14 '24 02:04 skotopes

https://github.com/flipperdevices/flipperzero-firmware/pull/3583 coming next release

Bless you! Thanks!

ecopsychologer avatar Apr 14 '24 03:04 ecopsychologer