Skip to content

Commit

Permalink
Aded Internal Serial Port.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfraz committed Aug 12, 2024
1 parent 19d93d1 commit ebb3c90
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/Hello World/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

1) Open Arduino IDE, create project and pste the following code:

https://github.com/jsfraz/esp32-examples/blob/babe66bb216f46ae25eea57311abe4f44c718429/examples/Hello%20World/sketch/sketch.ino#L1-L8
https://github.com/jsfraz/esp32-examples/blob/19d93d1fda92e05c4c6ff4420fcf878207474cf1/examples/Hello%20World/sketch/sketch.ino#L1-L8

2) **Press and hold ESP32 Boot button** and click **Upload** in Arduino IDE. You can release the button when `Connecting...` text shows up in **Output**.

Expand Down
16 changes: 16 additions & 0 deletions examples/Internal Serial Console/README.md
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)
9 changes: 0 additions & 9 deletions examples/Internal Serial Console/sketch/sketch.ino

This file was deleted.

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);
}
}

0 comments on commit ebb3c90

Please # to comment.