Wemos D1 and Arduino IDE : Getting started

1. Preparation

Open the preferences in the Arduino IDE :

In the “Additional Board Manager URLs” add the following url :
http://arduino.esp8266.com/stable/package_esp8266com_index.json

Open then the boards managers :

And install the ESP8266 boards :

And wait for the installation to be done :

Then select the Wemos board :

And select the right serial speed :

2. Hello world

Then we can try a very simple program, blinking the integrated LED :

void setup() {
  // put your setup code here, to run once:
  pinMode(D4,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(D4,HIGH);
  delay(1000);
  digitalWrite(D4,LOW);
  delay(1000);
}

You should be able to upload your program !

3. Issues

You might have an issue like :

can't open device "/dev/ttyUSB0": Permission denied

In this case, just add your user in the dialout group :

~$ sudo usermod -a -G dialout $USER

Then logout and login again.

Leave a Reply

Your email address will not be published. Required fields are marked *