-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analog in? #5
Comments
Yes, I'm interested in ADC inputs too. e.g. to read distance sensors (optical, ultrasonic, etc). What's the best way to read ADC inputs to use in conjunction with |
my current solution, while horrible, was to write a small c program without
using the "state" function that just ran once, called the variables and
returned the variables via print. From there the python program runs it,
takes the output and converts/splits it into variables, which I then use.
I'd be wary of checking the led states for percentages as the battery
monitor assumes the battery depletes at a linear fashion instead of how it
really depletes. 25% battery and 0 battery are less than a minute apart.
…On Wed, Apr 11, 2018, 8:46 AM Brendan Simon ***@***.***> wrote:
Yes, I'm interested in ADC inputs too. e.g. to read distance sensors
(optical, ultrasonic, etc).
What's the best way to read ADC inputs to use in conjunction with rcpy.
Ideally rcpy would implement an ADC module, but since it's not present is
there another solution in the interim?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK3vNU5uNzIz_HjuxoaQZqK-Tph8Ur1Rks5tnfsWgaJpZM4Su2Hf>
.
|
The C libraries seem to be very comprehensive, and looking at the Python wrapper code it seems that it shouldn't be too difficult to add for the ADC module (and other missing modules too). So I've taken the plunge (started a quick hacking investigation) to see if I can create the Python bindings to the low-level C functions. |
I've made some progress and my limited tests seem to suggest that it might work :) You can find my fork/branch here: https://github.com/BrendanSimon/rcpy/tree/bjs/adc_bindings I've submitted a pull request here: |
Thank you Brendan! I already merged with master. |
Specifically battery voltage and DC?
What is needed to add these
The text was updated successfully, but these errors were encountered: