ESP32 GPIO ADC Channel Error #7152
Replies: 1 comment
-
Posted at 2019-07-18 by Robin Thr 2019.07.18 Hello @ukaton and welcome to the world of Espruino! Over time, I believe you will find the shortened debug times with Espruino will far surpass that of Arduino development. Thank you for posting your code. I'm not an ESP32 wiz, but the code appears to be attempting to read using an analog read on every pin. Is it possible that the pins attempted to be read should be using digitalRead() ?
It should be possible to determine either using the source:
Curiosity got the better of me, *what is the GPIO config for ESP32*? > https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ This link may be needed also Posted at 2019-07-18 by AkosLukacs I guess it's multiple things: This code works for me (ok, just pulled the pins to 3v3 with a resistor, but results were around 0.999, when pulled to 3v3, so seems to be ok).
Prints something like this (D34 is pulled to 3v3, the rest is just floating):
Just multiply the results with 3.3 to get the voltage in volts, if you don't have any voltage divider. Posted at 2019-07-19 by Zakaton Thanks for the help! (I work with @ukaton) You've been very helpful! We were able to access the motion sensor and some of the pressure sensors and make a simple demo we posted over on Twitter: https://twitter.com/ConcreteSciFi/status/1152324107427442688 However, due to the lack of support for the ESP32 atm, we think it's best to switch to another platform. We'd like to use a lot more features on the ESP32, and we'll definitely switch back to Espruino in the future when appropriate. We love what your platform stands for. Posted at 2019-07-20 by maze1980 I would be interesting to hear why you switched from Arduino/PlatformIO to Espruino. I'd say you could integrate the ESP32 in your PCB design. Posted at 2019-07-20 by AkosLukacs Nice & thanks for getting back! (edit: after some digging into the Espressif's SDK & ADC2 issues, the ESP32 feels like a dual core trainwreck...) Posted at 2019-07-20 by @MaBecker check this for getting better analog read quality |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-07-18 by ukaton
I've been running into some issues since moving away from working in the Arduino IDE/PlatformIO to developing in Espruino for the ESP32.
The goal is to read 16 GPIO pins [GPIO's 0, 2, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39] all of which can be read using the ESP32 libraries in either Arduino or PlatformIO but I receive the following ADC Channel Err if I try doing the same in Espruino IDE. I attached a js file of the code I used to test this out.
Please let me know if you have either had the same issue and/or have resolved this already. If you've resolved it, please let me know how you did it (I might be missing something critical here).
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions