หมวดไฟฟ้า/อิเล็กทรอนิกส์/คอมพิวเตอร์ => Programming => ห้องคอมพิวเตอร์ => ทุกเรื่องของ Arduino => ข้อความที่เริ่มโดย: Auto Man ที่ 21 มิถุนายน 2561, 06:55:39

หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 06:55:39
 - มีจัดอุปกรณ์ครบชุดนำไปใช้ได้เลยหลายใบงาน ไม่ต้องหาซื้อทีละตัว ราคาชุดละ 590 บาท ค่าส่ง EMS 50 บาท รวมเป็น 640 บาท
เพื่อการศึกษา 5 5 5
ArduinoAll IoT ESP8266 Starter Kit ชุด Starter Kit คอร์สอบรม เรียนรู้ ESP8266 kit สำหรับผู้เริ่มต้น  (https://www.arduinoall.com/product/1378/arduinoall-iot-esp8266-starter-kit-%E0%B8%8A%E0%B8%B8%E0%B8%94-starter-kit-%E0%B8%84%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B8%AA%E0%B8%AD%E0%B8%9A%E0%B8%A3%E0%B8%A1-%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%A3%E0%B8%B9%E0%B9%89-esp8266-kit-%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A%E0%B8%9C%E0%B8%B9%E0%B9%89%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%95%E0%B9%89%E0%B8%99-)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62464699)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62464698)

  ต้องการซื้ออุปกรณ์ไปที่ร้านนี้ คลิ๊กที่นี่... (https://www.arduinoall.com/category/131/internet-of-things-iot/esp8266-wifi)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62167309)

รายละเอียดศึกษาจาก

http://narong.ece.engr.tu.ac.th/ei444/document/ESP8266.pdf
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 08:52:45
  เมื่อวานวิทยากร : อาทร คุ้มฉายา
  ได้แนะนำบอร์ด NodeMCU ในเรื่องของการเขียนโปรแกรมเบื้องต้นไปแล้ว

Pro1
โค๊ด: [Select]
void setup() {

}

void loop() {

}

Pro6
โค๊ด: [Select]
byte data1=0;

void setup()
{
  delay(100);
 Serial.begine(9600);
}
void loop()
{
 data1=data1+1;
 Serial.print("Value=");
 Serial.println(data1);
 delay(100);
}

โค๊ดสั่งให้ Ry1 ออกเอาท์พุท D3
โค๊ด: [Select]
#define Ry1 D3
void setup()
{
 pinMode(Ry1,OUTPUT);
}
void loop()
{
  digitalWrite(Ry1,0);
  delay(500)
  digitalWrite(Ry1,1);
  delay(500)
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 09:11:31
Pro7
โค๊ด: [Select]
byte light=0;

void setup()
{
  delay(100);
 Serial.begine(9600);
}
void loop()
{

 Serial.print("light=");
 Serial.println(light);
 delay(100);
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 10:02:00
สไลด์หน้า 72
โค๊ด: [Select]
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
void setup() {
  OLED.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop(){
  OLED.clearDisplay();
  OLED.setTextColor(WHITE);
  OLED.setCursor(8, 0);
  OLED.setTextSize(3);
  OLED.println(" BPCD. ");
  OLED.setCursor(0, 30);
  OLED.setTextSize(2);
  OLED.println("  Vec 4.1");
  OLED.setCursor(0, 50);
  OLED.setTextSize(1);
  OLED.println("http://bpcd.vec.go.th");
  OLED.display(); //
}

โค๊ด: [Select]
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
void setup() {
  OLED.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop(){
  OLED.clearDisplay(); //ลบหน้าจอออก
  OLED.setTextColor(WHITE); // เซ็ทเคอร์เซอร์ไปเริ่มต้นที่ไหน
  OLED.setCursor(8, 0);
  OLED.setTextSize(3);
  OLED.println(" BPCD. ");
  OLED.setCursor(0, 30);
  OLED.setTextSize(2);
  OLED.println("  Vec 4.1");
  OLED.setCursor(0, 50);
  OLED.setTextSize(1);
  OLED.println("http://bpcd.vec.go.th");
  OLED.display(); // คำสั่งแสดงผลออกมา
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 10:16:58
Count
โค๊ด: [Select]
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
int x=0;
void setup() {
  OLED.begin(SSD1306_SWITCHCAPVCC, 0x3C); //initialize
}
void loop(){
  OLED.clearDisplay();
  OLED.setTextColor(WHITE);
  OLED.setCursor(0, 0);
  OLED.setTextSize(3);
  OLED.println("COUNT");
  OLED.setCursor(0,27);
  OLED.println(x,DEC);
  OLED.display(); //
  delay(300);
  x++;
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 10:39:23
Sub Program
โค๊ด: [Select]
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
int x=0;
void setup() {
  OLED.begin(SSD1306_SWITCHCAPVCC, 0x3C); //initialize
}
void loop(){
  OLED.clearDisplay();
  OLED.setTextColor(WHITE);
  OLED.setCursor(0, 0);
  OLED.setTextSize(3);
  OLED.println("COUNT");
  OLED.setCursor(0,27);
  OLED.println(x,DEC);
  OLED.display(); //
  setpoint();
}
void setpont()
{
  delay(300);
  x++;

}
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 10:50:39
กำหนดสวิทช์
โค๊ด: [Select]
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
int x=0;
void setup() {
  OLED.begin(SSD1306_SWITCHCAPVCC, 0x3C); //initialize
  pinMode(D3,INPUT_PULLUP);
  pinMode(D4,INPUT_PULLUP);
  Serial.begin(9600);
}
void loop(){
  OLED.clearDisplay();
  OLED.setTextColor(WHITE);
  OLED.setCursor(0, 0);
  OLED.setTextSize(3);
  OLED.println("COUNT");
  OLED.setCursor(0,27);
  OLED.println(x,DEC);
  OLED.display(); //
  setpoint();
}
void setpont()
{
  delay(300);
  x++;

}
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 11:08:12
ตั้งค่าเซ็ทพอยน์ได้

   ใช้สวิทช์สองตัว รับค่าว่า
กดตัวขวา บวกเพิ่มอีกหนึ่ง
กดตัวซ้าย ลบออกหนึ่

โค๊ด: [Select]
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
int x=0;
void setup() {
  OLED.begin(SSD1306_SWITCHCAPVCC, 0x3C); //initialize
  pinMode(D3,INPUT_PULLUP);
  pinMode(D4,INPUT_PULLUP);
  Serial.begin(9600);
}
void loop(){
  OLED.clearDisplay();
  OLED.setTextColor(WHITE);
  OLED.setCursor(0, 0);
  OLED.setTextSize(3);
  OLED.println("COUNT");
  OLED.setCursor(0,27);
  OLED.println(x,DEC);
  OLED.display(); //
  setpoint();
}
void setpont()
{
  Serial.println(digitalRead(D3));
  Serial.println(digitalRead(D4));
 
 if(digitalRead(D3)==0)
 {
   x++;
 }
  if(digitalRead(D4)==0)
 {
   x--;
 } 

}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 11:43:55
ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105291)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105292)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 11:51:03
การทดลองนี้ ต้องต่อ DHT11 และจอ OLED ด้วย

 กำหนดให้ D5 รับ DHT11

เวอร์ชั่นก่อนหน้านั้น

โค๊ด: [Select]
// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain

#include "DHT.h"

#define DHTPIN D6         // what pin we're connected to dht's data pin
#define DHTPIN_VDD 16     // what pin we're connected to dht's vcc pin
#define DHTPIN_GND 12     // what pin we're connected to dht's gnd pin

// Uncomment whatever type you're using!
#define DHTTYPE DHT11   // DHT 11
//#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Connect pin 1 (on the left) of the sensor to +5V
// NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1
// to 3.3V instead of 5V!
// Connect pin 2 of the sensor to whatever your DHTPIN is
// Connect pin 4 (on the right) of the sensor to GROUND
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor

// Initialize DHT sensor for normal 16mhz Arduino
//DHT dht(DHTPIN, DHTTYPE);
// NOTE: For working with a faster chip, like an Arduino Due or Teensy, you
// might need to increase the threshold for cycle counts considered a 1 or 0.
// You can do this by passing a 3rd parameter for this threshold.  It's a bit
// of fiddling to find the right value, but in general the faster the CPU the
// higher the value.  The default for a 16mhz AVR is a value of 6.  For an
// Arduino Due that runs at 84mhz a value of 30 works.
// Example to initialize DHT sensor for Arduino Due:
DHT dht(DHTPIN, DHTTYPE, 30);

void setup() {
// power to dht
  pinMode(DHTPIN_VDD, OUTPUT);
  pinMode(DHTPIN_GND, OUTPUT); 
  digitalWrite(DHTPIN_VDD, HIGH);
  delay(100);                       // waiting for dht start up.
 
  Serial.begin(9600);
  Serial.println("DHTxx test!");

  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements.
  delay(2000);

  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit
  float f = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  // Compute heat index
  // Must send in temp in Fahrenheit!
  float hi = dht.computeHeatIndex(f, h);

  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.print(" *C ");
  Serial.print(f);
  Serial.print(" *F\t");
  Serial.print("Heat index: ");
  Serial.print(hi);
  Serial.println(" *F");
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 12:12:55
ไปดาวน์เวอร์ชั่นเป็น 1.2.2

 ระวังขา D6 จะไม่นับเรียงกันไปจาก D0  ต้องดูตำแหน่งให้ชัดเจน

โค๊ด: [Select]
// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain

#include "DHT.h"

#define DHTPIN D6     // what pin we're connected to

// Uncomment whatever type you're using!
#define DHTTYPE DHT11   // DHT 11
//#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Connect pin 1 (on the left) of the sensor to +5V
// NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1
// to 3.3V instead of 5V!
// Connect pin 2 of the sensor to whatever your DHTPIN is
// Connect pin 4 (on the right) of the sensor to GROUND
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor

// Initialize DHT sensor.
// Note that older versions of this library took an optional third parameter to
// tweak the timings for faster processors.  This parameter is no longer needed
// as the current DHT reading algorithm adjusts itself to work on faster procs.
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  Serial.println("DHTxx test!");

  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements.
  delay(2000);

  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit (isFahrenheit = true)
  float f = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  // Compute heat index in Fahrenheit (the default)
  float hif = dht.computeHeatIndex(f, h);
  // Compute heat index in Celsius (isFahreheit = false)
  float hic = dht.computeHeatIndex(t, h, false);

  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.print(" *C ");
  Serial.print(f);
  Serial.print(" *F\t");
  Serial.print("Heat index: ");
  Serial.print(hic);
  Serial.print(" *C ");
  Serial.print(hif);
  Serial.println(" *F");
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 12:14:23
   ถ้าเสียบขาถูกจะได้ดังภาพ


ถ้าเสียบขาผิด จะบอกว่า Fail Sensor
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 12:18:09
float f = dht.readTemperature(true);
อ่านค่าอุณหภูมิ เก็บไว้ที่ตัวแปร F

โค๊ด: [Select]
// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain

#include "DHT.h"

#define DHTPIN D6         // what pin we're connected to dht's data pin
#define DHTPIN_VDD 16     // what pin we're connected to dht's vcc pin
#define DHTPIN_GND 12     // what pin we're connected to dht's gnd pin

// Uncomment whatever type you're using!
#define DHTTYPE DHT11   // DHT 11
//#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Connect pin 1 (on the left) of the sensor to +5V
// NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1
// to 3.3V instead of 5V!
// Connect pin 2 of the sensor to whatever your DHTPIN is
// Connect pin 4 (on the right) of the sensor to GROUND
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor

// Initialize DHT sensor for normal 16mhz Arduino
//DHT dht(DHTPIN, DHTTYPE);
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  Serial.println("DHTxx test!");

  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements.
  delay(2000);

  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit
  float f = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.print(" *C ");
 
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 13:10:25
ผลการรันโปรแกรม

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105326)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 13:19:10
ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105331)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105332)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 13:25:30
  เรื่องเซนเซอร์แสง


เมื่อต่อเข้ากับบอร์ดแล้วต้องมีการเทสก์บอร์ดก่อน
ด้วยการโหลดโค๊ด

โค๊ด: [Select]
/*
  AnalogReadSerial

  Reads an analog input on pin 0, prints the result to the Serial Monitor.
  Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);        // delay in between reads for stability
}

   แล้วมอนิเตอร์ทาง Serial Monitor

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105334)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 14:47:10
   โค๊ดนี้เป็นการส่งข้อมูลจากตัวบอร์ด ไปแสดงผลที่มือถือ
โดยต้องไปร้องขอรหัส token ผ่านมือถือที่โหลดแอป Blynk แล้วจะส่งรหัสผ่านอีเมล์ของเรา
นี่คือเหตุผล ที่เราจำเป็นต้องมีอีเมล์

โค๊ด: [Select]
/*************************************************************
  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  This example runs directly on NodeMCU.

  Note: This requires ESP8266 support package:
    https://github.com/esp8266/Arduino

  Please be sure to select the right NodeMCU module
  in the Tools -> Board menu!

  For advanced settings please follow ESP examples :
   - ESP8266_Standalone_Manual_IP.ino
   - ESP8266_Standalone_SmartConfig.ino
   - ESP8266_Standalone_SSL.ino

  Change WiFi ssid, pass, and Blynk auth token to run :)
  Feel free to apply it to any other example. It's simple!
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "c21f4fc1e2c349f79f5efe0b5d3e396d";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "AndroidAP"; // ชื่อ WIFI
char pass[] = "zfky0208";
BlynkTimer timer;

void light()
{
 Blynk.virtualWrite(V1,analogRead(A0))
 
}


void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
}
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 18:27:07
  เมื่อเราได้โหลดแอป Blynk และทำการติดตั้ลงเครื่องของเรา

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105426)

  หน้าจอนี้จะปรากฏ หลังจากเรากรอกอีเมล์ และรหัสผ่านที่เราต้องการเข้าไป

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105424)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 18:29:30
  คลิ๊กที่ New Project
จะได้หน้าจอประมาณนี้  ชื่อโปรเจคส์ตั้งได้เลย

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105425)

   ตรง Choose Device เลือก NodeMCU 
นอกนั้นตามนั้น
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 18:35:22
ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105427)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 18:39:46
  ส่วนบนของโปรกรม มีปุ่มอะไรใช้บ้าง

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105428)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 18:42:50
จากนั้น ปัดหน้าจอบริเวณ ........ จะได้

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105429)

   เลือกปุ่ม Button

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105430)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 18:45:11
  จะได้ปุ่ม Button มาล่ะ  หากต้องการย้ายไปไว้ตรงกลางๆ ให้กดแช่ไว้ จากนั้นให้ลากไปวางยังจุด
ที่ต้องการ

    หากต้องการไปกำหนดคุณสมบัติของปุ่มกดให้ กดที่ปุ่ม  1 ครั้ง จะได้

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105451)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 20:54:34
   เมื่อกำหนดคุณสมบัติให้ปุ่มได้ถูกต้อง และได้โหลดโปรแกรมไปยัง NodeMCU แล้ว
สามารถสั่งรันผ่านมือถือได้เลย  ด้วยการกดปุ่มสามเหลี่ยม ด้านขวาบนของมือถือ เครื่องหมายสามเหลี่ยม
จะกลายเป็นสี่เหลี่ยม

    จากนั้นกดปุ่ม สั่งงานให้หลอด LED บนบอร์ดติด หรือดับได้แล้ว
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 20:58:17
   เมื่อสั่งหลอดติดหรือดับผ่านมือถือได้แล้ว  ต่อไปให้แทรก เกจเข้าไป
และกำหนดคุณสมบัติ

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105452)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 21:01:00
  และแทรก SuperChart เข้าไป

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105456)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 21:03:23
  อาจต้องมีการกำหนด AUTH Tokens ได้จากคุณสมบัติของโปรเจคส์
ให้กดปุ่ม Email all

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105464)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 21:04:30
   จากนั้นไปเปิดอีเมล์ จะมีเมล์จาก Blynk แจ้งรหัส Tokens ให้ก๊อปปี้ไปวางในโปรแกรม
ในส่วนของ

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105512)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105476)

 ลองดูการนำ AUTH Tokens ไปใส่ในโปรแกรม รวมถึงชื่อไวไฟ และรหัสผ่านไวไฟ

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105552)
หัวข้อ: Arduino ESP8266 (NodeMcU)
เริ่มหัวข้อโดย: Auto Man ที่ 21 มิถุนายน 2561, 21:15:07
  ทดสอบแล้วก็โอเค

  รวมถึงสามารถสั่งรายงานออกเป็นไฟล์ในรูปแบบ eXcel เพื่อนำไปประมวลผลได้

  หน้าตาแอป Blynk

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/62105553)