From c62c9c44d13ed18d6ff36aa64d06bf8caca4e8cd Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Thu, 17 Sep 2020 12:50:53 +0200 Subject: [PATCH] Set up serial connection from arduino --- magic-veneer-arduino/src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/magic-veneer-arduino/src/main.cpp b/magic-veneer-arduino/src/main.cpp index 4acb0ac..218ee37 100644 --- a/magic-veneer-arduino/src/main.cpp +++ b/magic-veneer-arduino/src/main.cpp @@ -13,5 +13,10 @@ void setup() void loop() { int distance = sensor.getDistance(); - Serial.println(distance); + + if (distance < 40) + { + Serial.println("isWithinThreshhold"); + } + delay(100); } \ No newline at end of file