From 517243f6e7b083f08223d93396b77a64257ca103 Mon Sep 17 00:00:00 2001 From: Dhruva Gole Date: Sun, 18 Dec 2022 09:29:52 +0530 Subject: [PATCH] samples: hello arduino: Clean up Cleanup hello_arduino sample by removing comments that no longer apply and also removing unnecessary amount of prints. Signed-off-by: Dhruva Gole --- samples/hello_arduino/src/app.cpp | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/samples/hello_arduino/src/app.cpp b/samples/hello_arduino/src/app.cpp index aa7cd536..33af1107 100644 --- a/samples/hello_arduino/src/app.cpp +++ b/samples/hello_arduino/src/app.cpp @@ -3,27 +3,13 @@ */ #include -#include "zephyrSerial.h" - void setup() { - // put your setup code here, to run once: - Serial.begin(115200); // dummy as of now, need to study and refer https://docs.zephyrproject.org/latest/hardware/peripherals/uart.html + // put your setup code here, to run once: + Serial.begin(115200); } void loop() { - char c = 'D'; - size_t ret1; - size_t ret2; - ret1 = Serial.print(c); - ret2 = Serial.println("Hello, World!"); - printk("Sizes: %d %d\n", ret1, ret2); - Serial.println(); - ret1 = Serial.print("My letter is: "); - ret2 = Serial.println(c); - printk("Sizes: %d %d\n", ret1, ret2); - Serial.println(); - char myString[] = "Will it print?"; - ret1 = Serial.println(myString); - printk("Size: %d \n\n\n", ret1); - delay(1000); // 1 second delay + // loop function for continuously executing code + Serial.println("Hello World!"); + delay(1000); }