Python
2
Вклад в тег
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
mySerial.println("AT+RST");
mySerial.println("AT+GMR");
mySerial.println("AT+CWMODE_DEF=1");//_DEF
delay(50);
mySerial.println("AT+CWJAP_DEF=\"routerr\",\"1029384756\"");
delay(6000);
mySerial.println("AT+CIPSTART=\"TCP\",\"192.168.1.11\",80");
delay(50);
mySerial.println("AT+CIPSEND=43");
delay(50);
mySerial.println("GET / HTTP/1.1\r\nHost: 192.168.1.11\r\n\r\n\r\n\r\n");
//delay(5000);
//mySerial.println("AT+CIPCLOSE");
}
void loop()
{
if (Serial.available()) mySerial.write(Serial.read());
if (mySerial.available()) Serial.write(mySerial.read());
delay(10);
}