Difference between revisions of "ESP8266"

From Review or Discard at Will
Jump to: navigation, search
(Initial creation)
 
(Add serial terminal)
Line 3: Line 3:
 
*[https://sites.google.com/site/terminalbpp/ Terminal] com port development tool
 
*[https://sites.google.com/site/terminalbpp/ Terminal] com port development tool
 
*[http://www.electrodragon.com/w/ESP8266 ESP8266] at Electrodragon
 
*[http://www.electrodragon.com/w/ESP8266 ESP8266] at Electrodragon
 +
===Arduino as serial terminal===
 +
 +
<source lang="text">
 +
/*
 +
jha 9/9/2015
 +
 +
eXperiment with Esp8266
 +
Use the arduino as a terminal to check / program the ESP8266
 +
found the soft serial code here: https://www.arduino.cc/en/Tutorial/SoftwareSerialExample
 +
 +
"Works on my machine"
 +
 +
*/
 +
 +
#include <SoftwareSerial.h>
 +
 +
SoftwareSerial mySerial(10, 11); // RX, TX
 +
 +
void setup() {
 +
 +
  Serial.begin(115200);
 +
  mySerial.begin(115200); // the ESP8266 I bough on Amazon defaulted to 115,200 baud rate.
 +
 +
}
 +
 +
// the loop function runs over and over again forever
 +
void loop() {
 +
 
 +
  if (mySerial.available()) {
 +
    Serial.write(mySerial.read());
 +
  }
 +
  if (Serial.available()) {
 +
    mySerial.write(Serial.read());
 +
  }
 +
}
 +
</source>

Revision as of 17:30, 16 September 2015

ESP8266

Resources

Arduino as serial terminal

/*
jha 9/9/2015

eXperiment with Esp8266
Use the arduino as a terminal to check / program the ESP8266
found the soft serial code here: https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

"Works on my machine"

*/

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {

  Serial.begin(115200);
  mySerial.begin(115200); // the ESP8266 I bough on Amazon defaulted to 115,200 baud rate.

}

// the loop function runs over and over again forever
void loop() {
  
   if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}