- Thu Jan 07, 2016 9:22 am
#38144
timguy wrote:Great original post. Helped me a lot to get along with the board.
Only one difference for me:
The CdS photo resistor is attached to the ADC on the ESP8266. Specifying port=99 will return the value of the ADC.
For me I can read the photo resistor with AO which is Pin 17 and not 99. 99 always return zeros, while reading analog PIN 17 return values between 4 (bright) to 95 (dark).
Thanks
Tim
Thanks and I am glad it was of some help to you. You are, of course, correct about A0 and the CdS cell. In the .ino file I was using switch/ case after converting the ASCII to numeric in the string (e.g., port-99)...
Code: Select all // this is for the ADC CDS resistor
case 99:
Ain=analogRead(A0);
break;
... and since 00 was taken, I identified it as 99. Convenient albeit misleading
DrG