จะทดลองด้วยการใช้ blink led นะครับ
ก่อนอื่นเราต้องติดตั้ง board ก่อนครับวิธีการดังนี้
ไปที่ file เลือก preference
หลังจากนั้นจะขึ้น popup Preferences ให้เราใส่ที่ช่อง additional board manager url ตามรูป
next ไปที่ tools เลือก board แล้วไปที่ boards manager...
ให้ทำการ Install Esp8266
เมื่อทำการ Install สำเร็จจะขึ้น board wemos d1 ให้เราเลือกใช้ได้
เมื่อเสียบบอร์ด wemos d1 ให้เราทำการติดตั้ง driver และเลือก port ตามเครื่องของผู้ใช้งาน
ของทางร้านเป็น port 3
เป็นอันเรียบร้อยสำหรับการติดตั้ง esp8266 ให้สามารถใช้งาน wemos d1
หลังจากนั้นให้เราทดสอบด้วยการทดสอบ blink
void setup() {
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(BUILTIN_LED, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(BUILTIN_LED, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
ผลทดสอบ
https://goo.gl/photos/e22HRFMD8XVBcPny9
ขอบคุณครับ ที่แวะมาอุดหนุนทางร้าน