คือผม up โหลด คำสั่งลงบอร์ด Arduino ไม่ผ่านครับ แต่กดตรวจโค๊ดถูกครับ โค๊ดผม็ก็อปมาจากเว็ป
https://www.youtube.com/watch?v=S4KXsfYRDD0 ครับ นี้คือ โค๊ดครับ
#define SSID "akaphan" // ชื่อ ssid
#define PASSWORD "bankha100" // รหัสผ่าน
#include "uartWIFI.h"
#include <SoftwareSerial.h>
WIFI wifi;
extern int chlID; //client id(0-4)
int led = 12;
void setup()
{
pinMode(led,OUTPUT);
digitalWrite(led,0);
wifi.begin();
bool b = wifi.Initialize(STA, SSID, PASSWORD);
delay(8000);
wifi.confMux(1);
delay(200);
if(wifi.confServer(1,8080)){
digitalWrite(led,1);
delay(2000);
digitalWrite(led,0);
}
}
void loop()
{
char buf[100];
int iLen = wifi.ReceiveMessage(buf);
if(iLen > 0)
{
if (strcmp(buf, "HELLO") == 0) //
{
if(digitalRead(led)==0){
digitalWrite(led,1);
wifi.Send(chlID,"LED ON ");
}
else{
digitalWrite(led,0);
wifi.Send(chlID,"LED OFF");
}
//wifi.Send(chlID,"HELLO BACK"); //
}
}
}
ตรวจสอบโค็ดผ่านครับ
แต่ตอน UP ลงบอร์ด กับไม่ผ่านครับ มันคืออะไรครับ มันขึ้นแบบนี้ครับ
Arduino: 1.6.5 (Windows 7), Board: "Arduino/Genuino Uno"
Sketch uses 11,088 bytes (34%) of program storage space. Maximum is 32,256 bytes.
Global variables use 822 bytes (40%) of dynamic memory, leaving 1,226 bytes for local variables. Maximum is 2,048 bytes.
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x82
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x82
Problem uploading to board. See
http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
นี่คือการต่อวงจรจากบอร์ด Wi-Fi Module ESP8266 ไปบอร์ด Arduino
Vcc-3.3V
Gnd-Gnd
CH_PD-3.3V
TX-RX(ขา 1)
Rx-TX(ขา 0)
ตามเว็ปที่กล่าวไว้ข้างต้นครับ
แต่ถ้าผม แก้การต่อเป็น
Vcc-3.3V
Gnd-Gnd
CH_PD-3.3V
TX-TX(ขา 0)
Rx-RX(ขา 1)
สามารถ up ลงได้ครับ แต่ใช้งานไม่ได้ครับ
รบกวนพี่ๆ ช่วยผมด้วยครับ
up โหลด คำสั่งลงบอร์ด Arduino ไม่ผ่านครับ ช่วยด้วยครับ
#define SSID "akaphan" // ชื่อ ssid
#define PASSWORD "bankha100" // รหัสผ่าน
#include "uartWIFI.h"
#include <SoftwareSerial.h>
WIFI wifi;
extern int chlID; //client id(0-4)
int led = 12;
void setup()
{
pinMode(led,OUTPUT);
digitalWrite(led,0);
wifi.begin();
bool b = wifi.Initialize(STA, SSID, PASSWORD);
delay(8000);
wifi.confMux(1);
delay(200);
if(wifi.confServer(1,8080)){
digitalWrite(led,1);
delay(2000);
digitalWrite(led,0);
}
}
void loop()
{
char buf[100];
int iLen = wifi.ReceiveMessage(buf);
if(iLen > 0)
{
if (strcmp(buf, "HELLO") == 0) //
{
if(digitalRead(led)==0){
digitalWrite(led,1);
wifi.Send(chlID,"LED ON ");
}
else{
digitalWrite(led,0);
wifi.Send(chlID,"LED OFF");
}
//wifi.Send(chlID,"HELLO BACK"); //
}
}
}
ตรวจสอบโค็ดผ่านครับ
แต่ตอน UP ลงบอร์ด กับไม่ผ่านครับ มันคืออะไรครับ มันขึ้นแบบนี้ครับ
Arduino: 1.6.5 (Windows 7), Board: "Arduino/Genuino Uno"
Sketch uses 11,088 bytes (34%) of program storage space. Maximum is 32,256 bytes.
Global variables use 822 bytes (40%) of dynamic memory, leaving 1,226 bytes for local variables. Maximum is 2,048 bytes.
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x82
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x82
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
นี่คือการต่อวงจรจากบอร์ด Wi-Fi Module ESP8266 ไปบอร์ด Arduino
Vcc-3.3V
Gnd-Gnd
CH_PD-3.3V
TX-RX(ขา 1)
Rx-TX(ขา 0)
ตามเว็ปที่กล่าวไว้ข้างต้นครับ
แต่ถ้าผม แก้การต่อเป็น
Vcc-3.3V
Gnd-Gnd
CH_PD-3.3V
TX-TX(ขา 0)
Rx-RX(ขา 1)
สามารถ up ลงได้ครับ แต่ใช้งานไม่ได้ครับ
รบกวนพี่ๆ ช่วยผมด้วยครับ