Stream_Debug.ino example

Testing sketch to run StreamDebugger to copy text from one serial output to another.

Testing sketch to run StreamDebugger to copy text from one serial output to another.

1/** =========================================================================
2 * @example{lineno} Stream_Debug.ino
3 * @brief Testing sketch to run StreamDebugger to copy text from one serial
4 * output to another.
5 *
6 * @m_examplenavigation{page_extra_helper_sketches,}
7 * ======================================================================= */
8
9#include <Arduino.h>
10#include <StreamDebugger.h>
11StreamDebugger StreamDbg(Serial1, Serial);
12
13void setup() {
14 Serial.begin(115200);
15 delay(50);
16
17 Serial1.begin(9600);
18 delay(50);
19
20 StreamDbg.print("AT");
21}
22
23void loop() {
24 // Start direct-access from Serial to Serial1
25 StreamDbg.directAccess();
26}