Go Down

Topic: ESP8266 and Keyes KY017 tilt. How to wakeup from deepsleep & read voltage (Read 569 times) previous topic - next topic


The problem:  Can the ESP8266 read an external source voltage and decide it's value ?  i.e. if the PIN outputs 1volt or 0.015volts?

Have had nothing but SUCCESS with the ESP8266 <ESP8266WiFi.h>  library.  deepsleep's awakes every 5mins,  all over many days.  Was reading the temp/humidity through GPIO15.   yea.
Now I turned to the tilt meter.   PIN3 goes to 0.015volts while the LED is lit and 1 volt when it's out.

Running this to the RST pin of the 8266 has the desired effect in only one instance.  When the tilt meters goes from LED on to LED off  taking RST from 0.015v to 1.0v causing a reboot of the 8266.  Very primitive wakup....

I'd love to read TILT voltages like I read TEMP and HUMIDITY on GPIO2 and decide in software if this tilt is HIGH or LOW...   But, KY017 doesn't output a data stream reading library like the temp/humidity sensor ... 


was posting json data here:  https://thingspeak.com/channels/368180


schematic of the tilt monitor and ESP8266 that's reading temp/humidity on GPIO2

Unclear how to wake up on tilt other than the current setup that reboots the ESP8266 when RST pin goes from low to high ( .015 to 1.0 volts).   At boot the ESP8266 runs my firmware which in the attached setup reads temp and humidity then deepsleeps....

Want to read the TILT voltage that's on RST to determine if low or high....


schematic ...

Just discovered simple old analogRead(A0);  so problem solved.   Just send sensor data to ADC and read it!
Well, read this too:  http://arduino-esp8266.readthedocs.io/en/latest/reference.html

Go Up