-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
# Internal Serial Console | ||
|
||
You can communicate with ESP32 serial interface USB cable. | ||
|
||
## From ESP32 to PC | ||
|
||
You can use the same code as in Hello World example: | ||
|
||
https://github.com/jsfraz/esp32-examples/blob/19d93d1fda92e05c4c6ff4420fcf878207474cf1/examples/Hello%20World/sketch/sketch.ino#L1-L8 | ||
|
||
You can use **Tools > Serial Monitor** or any other serial client like [Putty](https://www.putty.org/) to read data from the serial port. | ||
|
||
## From PC TO ESP32 | ||
|
||
TODO codeblock | ||
|
||
You can use **Arduino IDE Serial Monitor** using **Tools > Serial Monitor** or any other serial client like [Putty](https://www.putty.org/) to send data to the serial port. | ||
|
||
## Sources | ||
|
||
- [ESP32 - Serial Monitor](https://esp32io.com/tutorials/esp32-serial-monitor) |
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
examples/Internal Serial Console/sketch_pc_to_esp32/sketch_pc_to_esp32.ino
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
void setup() { | ||
Serial.begin(9600); | ||
} | ||
|
||
void loop() { | ||
// Check if there is data comming | ||
if (Serial.available()) { | ||
// Read string until newline character | ||
String str = Serial.readStringUntil('\n'); | ||
Serial.println("String: " + str); | ||
} | ||
} |