Created
January 3, 2015 14:50
-
-
Save roboticboyer/cf42fb99871ccbeeeff2 to your computer and use it in GitHub Desktop.
Sw_Serial_Echo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial esp8266(9, 10); // RX, TX | |
void setup() | |
{ | |
// Open serial communications and wait for port to open: | |
//Serial.begin(9600); | |
Serial.begin(57600); | |
esp8266.begin(9600); | |
Serial.println("Echo da Seriale 00"); | |
} | |
void loop() // run over and over | |
{ | |
//Serial.print("Caratteri ricevuti: "); | |
//Serial.println(esp8266.available()); | |
int i=0; | |
while (esp8266.available()>0 ){ | |
i++; | |
Serial.write(esp8266.read()); | |
} | |
/* | |
delay(100); | |
if (i != 0) { | |
Serial.print("Caratteri ricevuti: "); | |
Serial.println(i); | |
Serial.println("Fine Trasmissione"); | |
Serial.print("\r\n\r\nr\n\r\n"); | |
}*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment