Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 390ac9f

Browse files
committed
Add instructions to example and test files.
1 parent 74af24b commit 390ac9f

File tree

7 files changed

+26
-2
lines changed

7 files changed

+26
-2
lines changed

examples/FirebaseSerialHost_ESP8266/FirebaseSerialHost_ESP8266.ino

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,26 @@
1616

1717
// FirebasePush_ESP8266 is a sample that will start our serial transciever
1818
// listening on a software port and allow debug info over main serial port.
19+
//
20+
// A suggested setup for testing this example would be a USB to TTL cable
21+
// with the green wire connected to pin 5 and the white wire connected to
22+
// pin 4.
23+
// First edit begin.txt and put in your host and secret.
24+
// Then run the following commands to setup the serial port in linux:
25+
// stty -F /dev/ttyUSB0 9600 raw -echo -echoe -echok
26+
// Then on one console do:
27+
// cat /dev/ttyUSB0 &
28+
// This console will now read all responses from the modem. Then do:
29+
// cat begin.txt > /dev/ttyUSB0
30+
// You should see +OK and you can now feed in theother example commmands.
1931

2032
#include <SoftwareSerial.h>
2133
#include <ESP8266WiFi.h>
2234

2335
#include <Firebase.h>
2436
#include <SerialTransceiver.h>
2537

26-
27-
SoftwareSerial data_serial(13 /*RX*/, 14/*TX*/);
38+
SoftwareSerial data_serial(5 /*RX*/, 4/*TX*/);
2839
firebase::modem::SerialTransceiver transceiver;
2940

3041
void setup() {
@@ -42,6 +53,10 @@ void setup() {
4253
Serial.println(WiFi.localIP());
4354

4455
data_serial.begin(9600);
56+
while (!data_serial) {
57+
Serial.println("Error initilizing serial.");
58+
delay(5000);
59+
}
4560

4661
transceiver.begin(&data_serial);
4762
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BEGIN $YOUR_HOST $YOUR_SECRET
2+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GET /serial/test
2+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GET /serial/push_test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PUSH /seria/push_test "this is a test string \ "
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REMOVE /serial/test
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SET /serial/test this is a test string \ "
2+

0 commit comments

Comments
 (0)