Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By froggy
#19961 Yes its from UK, and its near me so jumped in and got one. I will buy from China but I'm inpulsive and if I order today and its not here tomorow ITS LATE lol. anyway popped round bought one and now neglecting everything else i should be doing and playing with it.

i was a bit sceptical as i had heard that it only worked at 9600 and took over 5 mins to upload a sketch, maybe there was an earlier version, as i connected the USB it found the drivers straight away and uploaded an Arduino sketch in about 25 seconds. All that said my question now isnt about the ESP8266, more in general about the arduino sketch.

i thought i could set an LED on by using digitalWrite but it doesnt seem to work, I've set the dip switch correctly as the LED come on when the board powers up then goes off, but the following doesnt light an LED, anyone got any ideas.

#define LEDPIN 5
digitalWrite(LEDPIN, HIGH);

seems simple enough but am ai missing something? (I am a noob)
User avatar
By j0hncc
#19964
froggy wrote:
Code: Select all#define LEDPIN 5
digitalWrite(LEDPIN, HIGH);
)


There is nothing wrong with this code but:
1) digitalWrite(LEDPIN, HIGH) is not enough. Maybe you should post your entire sketch, and describe the hookup of your LED.
2) be aware as a newbie you can never trust gpio 4/5 to not be switched. So if your LED is on 5 try your code with either 5 or 4 and see if either works.

Cheers,
John