analogRead() and analog infrared sensor #3948
Unanswered
espruino-discuss
asked this question in
Puck.js, Pixl.js, Jolt.js and MDBT42
Replies: 1 comment
-
Posted at 2022-02-07 by @gfwilliams Not sure I understand the question? While Posted at 2022-02-07 by @MaBecker
Thanks, all good. Great, so it is normalized to be the range of 0 - 1 - good to know - thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-02-04 by @MaBecker
Some analog infrared sensor have 0-3V output.
As I don’t want to use a voltage divider I was thinking if a reconfigure of analogRead for nrf52 boards could work to read sensor voltage directly.
Coding starts here
https://github.com/espruino/Espruino/blob/0a9f07a0fc21d1f989adaa8f35f74b29349307d6/targets/nrf5x/jshardware.c#L2648
Beta Was this translation helpful? Give feedback.
All reactions