From 5ad0ed90871433c63934f32c52c37e37b80422bb Mon Sep 17 00:00:00 2001
From: kaijunge <kaijunge21@gmail.com>
Date: Wed, 19 Jan 2022 13:34:40 +0100
Subject: [PATCH] More comments on .ino file

---
 pyComms/pyComms.ino | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/pyComms/pyComms.ino b/pyComms/pyComms.ino
index b26e2ad..f25654e 100644
--- a/pyComms/pyComms.ino
+++ b/pyComms/pyComms.ino
@@ -1,7 +1,5 @@
-#include <Arduino.h>
 #include "pyCommsLib.h"
 
-
 /*
  * Variables for you need to define for this program to work
  */
@@ -32,6 +30,11 @@ void setup() {
 }
 
 void loop() {
+
+  ////////////////////
+  // RECEIVING DATA
+  ////////////////////
+  
   // Receive messages from python
   rawMsg = recieve_msg(rawMsg);
 
@@ -41,14 +44,24 @@ void loop() {
    * }
    */
 
-  // Fill up your data here
-  // Make sure to convert anything to a string. 
-  // This can be easilly done by doing String(whatever)
+
+  
+  ////////////////////
+  // SENDING DATA
+  ////////////////////
+  /*
+  Fill up your data here
+
+  MAKE SURE TO CONVERT ANYTHING TO A String TYPE!
+
+  This can be easilly done by doing String(whatever) - see Data[1] = String(20);
+  */
   Data[0] = "a";
-  Data[1] = "blah";
+  Data[1] = String(20);
   Data[2] = rawMsg;
 
   send_msg(msgName, Data, numOfMsg);
 
+  // this delay is not necessary - it's only to show that even with a delay this process works.
   delay(100);
 }
-- 
GitLab