/* * esp8266 CLOUD version chip * (with light sensor and LED light at the two corners) * * * gpio2 - small power/status led * a0 - analog read * * * RGB LED pin - not 4, 5, 0 * * pin 15 is RED */ #include const char* ssid = "hazard18"; const char* password = "pu1f0xylu1"; const char* host = "wifitest.adafruit.com"; void setup() { pinMode(15, OUTPUT); pinMode(2, OUTPUT); pinMode(A0, INPUT); Serial.begin(115200); delay(100); Serial.print("Starting... "); } int a0; void loop() { /* Serial.println("set 4 high"); digitalWrite(4, HIGH); delay(1500); Serial.println("set 4 low"); digitalWrite(4, LOW); delay(1000); */ Serial.println("set 5 high"); digitalWrite(15, HIGH); delay(500); Serial.println("set 5 low"); digitalWrite(15, LOW); delay(500); a0= (unsigned int) analogRead(A0); Serial.println("a0 val: " + String(a0)); }