diff --git a/pyComms/pyComms.ino b/pyComms/pyComms.ino index b26e2ad302e81e12d55c34583ca76b48f3c27081..f25654e58c84c804e16f10196e5c0367a3971321 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); }