Skip to content
Snippets Groups Projects
Commit 5ad0ed90 authored by kaijunge's avatar kaijunge
Browse files

More comments on .ino file

parent 1cf85c30
No related branches found
No related tags found
No related merge requests found
#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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment