Skip to content

Commit 887aa17

Browse files
committed
Updated ESP8266AT example for using SoftwareSerial, allowing hardware serial to be used for Debug.
1 parent 2cdffaf commit 887aa17

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

examples/ESP8266AT/ESP8266AT.ino

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,21 @@
1111

1212
#define ARDUINO_LED 13
1313

14+
// Emulate Serial1 on pins 6/7 if not present
15+
#ifndef HAVE_HWSERIAL1
16+
#include "SoftwareSerial.h"
17+
SoftwareSerial Serial1(6, 7); // RX, TX
18+
#endif
19+
1420
ThingerESP8266AT thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
1521

1622
void setup() {
1723
pinMode(ARDUINO_LED, OUTPUT);
1824

19-
// init ESP8266 in the connected serial port
25+
// initialize serial for ESP8266
26+
Serial1.begin(9600);
27+
28+
// init ESP8266 in the additional serial port
2029
WiFi.init(&Serial);
2130
if(WiFi.status() == WL_NO_SHIELD){
2231
// don't continue

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=thinger.io
2-
version=2.5.4
2+
version=2.5.5
33
author=Alvaro Luis Bustamante <[email protected]>
44
maintainer=Thinger.io <[email protected]>
55
sentence=Arduino library for the Thinger.io Internet of Things Platform.

0 commit comments

Comments
 (0)