Created
January 13, 2017 18:27
-
-
Save jtbg/19770812ad66876294024994e5a9872e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download and install the latest version of the arduino IDE from: https://www.arduino.cc/en/main/software | |
2. Start the Arduino IDE. Open the "Sketch" menu and select "Include Library" > "Manage libraries" | |
3. Search for the "Adafruit ESP8266" library and click "Install" | |
4. Select File > New to create a new sketch | |
in the new file, paste the basic sketch code in place of the code that's already there: | |
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
const char* ssid = "myCoolWiFiNetworkName"; //replace with your network name | |
const char* password = "mySecretWiFiPassword"; //replace with your network password | |
void setup(void){ | |
WiFi.begin(ssid, password); | |
while (WiFi.status() != WL_CONNECTED) { | |
delay(500); | |
Serial.print("."); | |
} | |
Serial.print("Connected to "); | |
Serial.println(ssid); | |
Serial.print("IP address: "); | |
Serial.println(WiFi.localIP()); | |
} | |
void loop(void){ | |
} | |
5. Plug in your Wemos d1 mini via microusb to the computer | |
6. Select Tools > Port and select the serial USB port (there are likely only two options you see, it's the one that isn't bluetooth) | |
7. Select Tools > Board and select "Wemos R2 D1 & mini" | |
8. In the top-left of the sketch window (where you wrote the code), click the check mark. It will prompt you to save your sketch, and compile. | |
9. If it compiles successfully, click the right-facing arrow next to the check mark button to send the code to your D1 | |
10. Congrats! The board should boot up, connect to the WiFi SSID you prescribed. There's no need to keep it plugged into your computer, any power source will do just fine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment