มีปัญหาเรื่องการใช้งาน ปรึกษาได้ที่เว็บบอร์ดนี้เลยครับ
ArduinoAll มีสินค้าหลายชนิด ผมอาจจะยังเล่นไม่หมด ต้องขออภัยมาไว้ล่วงหน้าครับผมจะพยายามช่วยแนะนำเท่าที่มีความรู้ ถ้ายังทำไม่เป็นก็จะพยายามหามาให้ ช่วย ๆ กันน่าจะทำออกได้ไว
ผมเขียนโค้ด Ethernet Shield W5100 ตามหน้า เว็ป สอน การ ไช้ งาน ควบคุมหลอดled ผ่านอินเตอร์เน็ต คือ มัน ไช้ งาน ได้ ตาม ที่ เว็ป บอก นะ ครับ แต่ พอ เรา เปลียน เป็น ใช้ เน็ต มือ ถือ เข้ามา ควบ คุม หลอด led มัน เข้า หน้า เว็ป เรา ไม่ ได้ อ่ ครับ พอมี วิธี แก้ ไข รึ ป่าว ครับ
อันนี้โค้ชครับ
#include "SPI.h"
#include "Ethernet.h"
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
/*byte ip[] = { 192, 168, 0, 4 }; // ip in lan
/*byte gateway[] = { 192, 168, 0, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask*/
EthernetServer server(80); //server port
String readString;
//////////////////////
void setup(){
pinMode(5, OUTPUT); //pin selected to control
//start Ethernet
Ethernet.begin(mac);
Serial.println("ArduinoAll server LED test"); // so I can keep track of what is loaded
}
void loop(){
// Create a client connection
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();
//read char by char HTTP request
if (readString.length() < 100) {
//store characters to string
readString += c;
//Serial.print(c);
}
//if HTTP request has ended
if (c == '\n') {
///////////////
Serial.println(readString); //print to serial monitor for debuging
client.println("HTTP/1.1 200 OK"); //send new page
client.println("Content-Type: text/html");
client.println();
client.println("");
client.println("");
client.println("ArduinoALL");
client.println("");
client.println("");
client.println("ArduinoAll Internet Button");
// DIY buttons
client.println("<a href= /on><h1>ON</h1></a>");
client.println("<a href = /off><h1>OFF</h1></a>");
client.println("");
client.println("");
delay(1);
//stopping client
client.stop();
///////////////////// control arduino pin
if(readString.indexOf("on") >0)//checks for on
{
digitalWrite(5, HIGH); // set pin 5 high
Serial.println("Led On");
}
if(readString.indexOf("off") >0)//checks for off
{
digitalWrite(5, LOW); // set pin 5 low
Serial.println("Led Off");
}
readString="";
}
}
}
}
}
ต้องใช้ ip จริงในการควบคุมผ่านอินเตอร์เน็ต ลองศึกษาเรื่อง no-ip และทำการ forword port มาที่ ip ของอุปกรณ์เราครับ
ต้องใช้ ip จริงในการควบคุมผ่านอินเตอร์เน็ต ลองศึกษาเรื่อง no-ip และทำการ forword port มาที่ ip ของอุปกรณ์เราครับ
จะลองดูนะครับ ขอบคุนสำหรับคำแนะ นำ ครับ (ถ้าไม่ได้เดียว มาถามไหม่ครับ)^^
ต้องใช้ ip จริงในการควบคุมผ่านอินเตอร์เน็ต ลองศึกษาเรื่อง no-ip และทำการ forword port มาที่ ip ของอุปกรณ์เราครับ
on-ip มัน สมัค แล้ว เสีย ตัง รึ ป่าว ครับ
no-ip มีทั้งแบบเสียเงินและแบบฟรี ลองดูตัวอย่างเช่นการติดตั้งกล้องวงจรปิดที่ดูผ่านมือถือครับ จะมีตัวอย่างการใช้ no-ip
ขอรบกวนสอบถาม arduinoall หน่อยครับเนื่องจากผมพึ่งซื้อมาใช้ esp8266 โมดูลสีดำ (100บาท)ได้ อาทิตย์หนึ่ง ยังไม่มีประสบการณ์ในเรื่องแบบนี้ครับ
คำถาม
1.โมดูลเสียหรือเปล่า ครับ เพราะผมใช้ คำสั่ง AT command : AT+RST มีการรายงานผลว่า mem fail
2. เมื่อถึงช่วงคำสั่งต่อ wifi ใส่ username password โมดูลจะทำการอยู่สักพักและก็ตัดไป ตามรูป
3. ถ้า frimware เสีย จะหามูลโหลดได้ที่ใหนครับ ส่วนใหญ่ผมจะเติมตัวอย่างสีฟ้าหรือสีน้ำเงินครับ
ทำไม่ได้ไม่ได้แปลว่าเสียนะครับ ถ้าโมดูลเสียจะต้องไม่ขึ้นอะไรเลยครับเพราะเป็นชิฟตัวเดียว แต่ถ้าเห็น wifi ลองอัพเดทเฟิร์มแวร์ดูครับ หรืออาจจะไฟไม่พอ มีสัญญาณรบกวน กรณีนี้เจอบ่อยครับ
โมดูลตัวดำesp 01 หาข้อ download ได้ที่ใหนครับ ส่วนใหญ่จะเจอแต่ตัวฟ้าครับ
ผมไม่แน่ใจ ลองใช้ตัวสีฟ้าแล้วอัพเดทแบบ clound ดูครับ เพราะชิฟตัวเดียวกัน