test vscode

This commit is contained in:
Reto Probst
2022-06-21 15:00:05 +02:00
parent 8485d88a1d
commit b4b368dc81

View File

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