-->
Page 4 of 11

Re: WIFI Witty / Gizwits ESP-12F module

PostPosted: Sat Jan 30, 2016 8:27 am
by bgowland
lord_alan wrote:I have flashed one of these with a new build of nodeMCU and am trying to read the LDR using LUA but
Code: Select allprint(adc.read(0))
always returns 65535 :-(


I don't know if you went any further with this but I was playing with ADC and the LDR last night and had some strange results.

You probably already know this but the docs at http://nodemcu.readthedocs.org/en/dev/en/modules/adc/ say...
Depending on the setting in the "esp init data" (byte 107) one can either use the ADC to read an external voltage, or to read the system voltage, but not both.

I initially tried...
Code: Select allprint(adc.read(0))

...as you did and also got a consistent 65535 but then I decided to try...
Code: Select allprint(adc.readvdc33())

...to see what happened.

According to the docs the return value of this is...
system voltage in millivolts (number)

If the ESP8266 has been configured to use the ADC for sampling the external pin, this function will always return 65535. This is a hardware and/or SDK limitation.

...but my initial reading was something like 1738 (decimal) which didn't make much sense for system voltage.

I then tried covering the LDR with a piece of card and the next reading was 232. Similarly, if I used a torch shining directly on the LDR I got readings of just over 4000. This seemed consistent with card / torch / casting shadows with my hand - all varying the return value.

This definitely doesn't tally - if, as the docs (above) say, the ADC is configured for external sampling (which I'd assume was the case for the LDR) then it SHOULD be returning a consistent 65535 but if it's NOT configured for external sampling I'd expect a fairly consistent value relating to system volage in millivolts instead of a variable value that is clearly affected by the light on the LDR. Totally confused.

Cheers,
Brian

Re: WIFI Witty / Gizwits ESP-12F module

PostPosted: Sat Jan 30, 2016 1:32 pm
by Creo
I just received a similar module: http://ru.aliexpress.com/item/Free-Ship ... 55100.html
But I can not understand: module is run, RGB led is flash (for any program) - where is the WI-FI access point??????????
And where is Android App????

Re: WIFI Witty / Gizwits ESP-12F module

PostPosted: Fri Feb 12, 2016 6:07 am
by Creo
1. I have a WIFI RGB strip controller: http://ru.aliexpress.com/item/RGBWW-Str ... e8a91a1adc
2. With my friend we downloaded full flash from controller.
3. Other friend helped to remove the protection on the MAC and remove pass for WI-FI.
4. There is only a problem with GPIO (grren and blue are mixed).
5. Android app in p.1 link (and of page)
6. Firmware in attach.

Re: WIFI Witty / Gizwits ESP-12F module

PostPosted: Wed Feb 17, 2016 6:00 pm
by mcauser