From b4b368dc81094b2476de0f823a054ced402a1770 Mon Sep 17 00:00:00 2001 From: Reto Probst Date: Tue, 21 Jun 2022 15:00:05 +0200 Subject: [PATCH] test vscode --- src/main.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index daa0787..1330a39 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,10 +19,14 @@ https://www.arduino.cc/en/Tutorial/BuiltInExamples/ASCIITable */ -void setup() { - //Initialize serial and wait for port to open: +// TEST + +void setup() +{ + // Initialize serial and wait for port to open: Serial.begin(9600); - while (!Serial) { + while (!Serial) + { ; // wait for serial port to connect. Needed for native USB port only } @@ -36,7 +40,8 @@ int thisByte = 33; // for example, '!' is the same as 33, so you could also use this: // int thisByte = '!'; -void loop() { +void loop() +{ // prints value unaltered, i.e. the raw binary version of the byte. // The Serial Monitor interprets all bytes as ASCII, so 33, the first number, // will show up as '!' @@ -52,7 +57,6 @@ void loop() { // Serial.print(thisByte, DEC); - Serial.print(", hex: "); // prints value as string in hexadecimal (base 16): Serial.print(thisByte); @@ -66,9 +70,11 @@ void loop() { Serial.println(thisByte); // if printed last visible character '~' or 126, stop: - if (thisByte == 126) { // you could also use if (thisByte == '~') { + if (thisByte == 126) + { // you could also use if (thisByte == '~') { // This loop loops forever and does nothing - while (true) { + while (true) + { continue; } }