Skip to content

Commit 6235a6d

Browse files
committed
Init repo
0 parents commit 6235a6d

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ESP8266 NodeMCU sample code
2+
3+
## Install
4+
5+
### CP210x drivers
6+
7+
Follow instructions at https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
8+
9+
### Arduino IDE
10+
11+
Follow instructions at https://www.arduino.cc/en/Main/Software
12+
13+
## Setup
14+
15+
Follow instructions at https://arduino-esp8266.readthedocs.io/en/latest/installing.html
16+
17+
With NodeMCU board, set Upload speed to 9600.
18+
19+
20+
## Upload code
21+
22+
Plug in, upload code & enjoy!

esp8266_blink/esp8266_blink.ino

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
void setup() {
2+
pinMode(0, OUTPUT);
3+
}
4+
5+
void loop() {
6+
digitalWrite(0, HIGH);
7+
delay(500);
8+
digitalWrite(0, LOW);
9+
delay(500);
10+
}

esp8266_led/esp8266_led.ino

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
void setup() {
2+
Serial.begin(9600);
3+
pinMode(D1, OUTPUT);
4+
pinMode(D3, OUTPUT);
5+
pinMode(D5, OUTPUT);
6+
pinMode(D7, OUTPUT);
7+
}
8+
9+
void loop() {
10+
digitalWrite(D1, HIGH);
11+
delay(1000);
12+
digitalWrite(D1, LOW);
13+
delay(1000);
14+
15+
digitalWrite(D3, HIGH);
16+
delay(1000);
17+
digitalWrite(D3, LOW);
18+
delay(1000);
19+
20+
digitalWrite(D5, HIGH);
21+
delay(1000);
22+
digitalWrite(D5, LOW);
23+
delay(1000);
24+
25+
digitalWrite(D7, HIGH);
26+
delay(1000);
27+
digitalWrite(D7, LOW);
28+
delay(1000);
29+
}

esp8266_wifi/esp8266_wifi.ino

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <ESP8266WiFi.h>
2+
3+
void setup()
4+
{
5+
Serial.begin(9600);
6+
Serial.println();
7+
Serial.setDebugOutput(true);
8+
9+
WiFi.begin("ssid", "password");
10+
11+
Serial.print("Connecting");
12+
while (WiFi.status() != WL_CONNECTED)
13+
{
14+
delay(500);
15+
Serial.print(".");
16+
}
17+
Serial.println();
18+
19+
Serial.print("Connected, IP address: ");
20+
Serial.println(WiFi.localIP());
21+
}
22+
23+
void loop() {}

libraries/readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For information on installing libraries, see: http://www.arduino.cc/en/Guide/Libraries

0 commit comments

Comments
 (0)