Having the option (v0.13.0) of an analog input is going to be great for some of my smaller projects.
However despite the tips of @tonyno in the (hardware section) I still cant get it to work.'And was hoping you guys might point out what I am overlooking here
Hardware Setup:
ESP8266 with WLED v0.13.0b3
Button 1 : GPIO1 (TXD0)
Potentiometer 10k Ohm
GPIO1 connected to middle pole of pot meter
3.3V connected to left pole of pot.meter
GND connected to right pole of pot meter
Settings:
LED preferences : Button 1 pin 1, Analog
Time & Macros : Button 1 short : 0; long : 0; double : 250
When measuring the potmeter (connected to the esp8266) the voltage drop/rise can be seen over middle and left (or right) pole
However I can’t see it have any effect.
I have tried with 3 different boards to rule out hardware failure. And the normal momentary button functionality works perfectly fine over the GPOI1-GND
There’s only one ADC pin on the ESP8266 ADC or ADC0, or A0 or TOUT.
You hook the middle pin of your pot to that pin (NOT GPIO1) even though you set WLED to some other unused pin.
Just a feature of the code…
Holy moly on a flying carpet… that was “the missing link”
There is an ADC0 pin which is marked A0 on the esp8266 board.
Once I took the RX pin (GPIO1) connector and placed it on the A0 one … voila!
Now, trying to understand how your minds work (I really couldn’t figure this one out) what reference do you have or what piece of info/text/whatnot where this is documented? That I have to use the ADC0 and not the pin mentioned in the LED preferences (even though that is where you enter the value 250)
I ask this because it seems you code / hardware people seem to understand this stuff easily and only need half complete instructions. Where as I need a complete IKEA manual to be able to do this.
Ah grasshopper it involves much meditation and living a proper life following the path to goodness.
It also really involves reading through heaps of notes gleaned from others who have already bashed their heads against the wall on this crap. From my humble POV, the whole ESP world of products (ESP32, ESP8266, et al) is still a WIP. Very good and very effective but with a number of landmines. The pin documentation (or lack thereof) and “best practices” is a minor example.
I’ve linked you into the pin usages reference, but there’s a vast swath of really useful info on much of the ESP line and how it can be used effectively.
Even with those pages, the ESP8266 ADC thing only became really apparent when you compare it to the ESP32 which allows for way more ADC pin assignments.
Keep reading and good luck
Looking into those pin references I now read the ADC as a “10 bit Analog to Digital Converter.”
Since the potmeter is as analog as it gets … hindsight and all that
And it’s reassuring to read it’s not just n00b-like me that’s having difficulty getting these things to the surface
Thanks for places like this where grasshoppers like me can be educated.