ESP 8266 Thing Dev board - LEDs HIGH=LOW and LOW=HIGH

Hi. I’m new to using the Thing, and still fairly new to Arduinos.

So far I’ve just tried to get the Thing Board working with the tutorials from the sparkfun site - Blink for the thing and the Web turn on and off LEDs.

Using the on board pin 5 LED:

when I turn it HIGH (or 1 for the second sample script), it turns off

when I turn it LOW (or 0 for the second sample script), it turns on

Hence this “blink” program: https://learn.sparkfun.com/tutorials/es … etch-blink

#define ESP8266_LED 5

void setup()

{

pinMode(ESP8266_LED, OUTPUT);

}

void loop()

{

digitalWrite(ESP8266_LED, HIGH);

delay(100);

digitalWrite(ESP8266_LED, LOW);

delay(1500);

}

will have the on board LED on most of the time with brief flashes of off.

Changing the ESP8266_LED to 13 and uploading the same program to an Arduino Uno does what I would expect - mostly off with brief flashes of on

When I use an external LED and run from the pin 5 out , the external LED does what you would expect - flashes opposite of what the on board LED - ie on when set HIGH, off when set LOW

Another thing I notices is that in the second program - the web one (https://learn.sparkfun.com/tutorials/es … web-server) - when I read the output of the analogue pin, it is reading in the 600s rather than the 48 that the tutorial implies it should read

Am I missing something?

Thanks in advance

Cheers

A.S.

Can you share a photo of the wiring/setup?

If you look at the schematic for the board, you will see that the pin 5 LED is connected to pin 5 and 3.3 volts. If you drive the pin high, you have 3.3 volts on both sides of the LED so no current can flow. If you drive the pin low, you have ground on one side of the LED and 3.3 volts on the other, allowing current to flow through the LED.

If the LED were connected to ground and the pin, it would function the way you are expecting but since it’s the other way around, it’s “backwards”.