0
votes

I got my first NodeMCU today and I'm trying to run the blink sketch from Arduino http://www.arduino.cc/en/Tutorial/Blink

I've installed ch340G driver (as its mentioned in my nodemcu) and everything went without any errors.

However the problem is, it says the program is uploaded 100%, but the LED is not blinking. I would expect the LED to blink after the upload.

Following is a screen shot of my setup:

Also, I did bit of googling and I've seen port errors can be caused by poor cables, but I'm using my GoPro cable here.

2
There are multiple versions of NodeMCU boards. Which one do you have?gre_gor

2 Answers

3
votes

There are 2 leds on the Nodemcu.

It might just be that the second led might be faulty.

Add this at the start of your blink code example

#ifdef LED_BUILTIN
#undef LED_BUILTIN
#endif
#define LED_BUILTIN 2

This will change the pin number for the builtin led, to the 2nd led on the Nodemcu.

Check if it works. If it does, then the 1st led is probably faulty.

I hope this helps.

3
votes

It seems to be loading fine, try restarting the board(reset button).

Maybe the LED is on another pin, nodeMCU pin numbers do not have to correspond to the ones used in arduino framework, take a look here for a possible pin mapping, example sketch and schema.

EDIT: LED is on pin D4