Save the World One Drop at a Time, Part 4: Uploading the Arduino Sketch Code
by will-iamalpine in Circuits > Electronics
1592 Views, 18 Favorites, 0 Comments
Save the World One Drop at a Time, Part 4: Uploading the Arduino Sketch Code
This will walk you through the process of uploading the code to your respective scouts.
- For your water main, unzip the file "BootstrapHALL"
- For your outlet, unzip the file "PiezoFinal"
You'll notice that these files include a series of bitlash and pinoocio based libraries that are necessary for your code to compile correctly.
You'll also notice the 'shell eval' command in the code. Our kind friends at Pinoccio created this function while we were working on this project so that we could send messages from our Arduino sketches to ScoutScript, and the mesh network.
A quick example:
Shell.eval("message.scout(1,0)"); // this line of code initiates a message command, informing the lead scout to blink at each reading, for convenience.
Shell.eval("hq.report(\"gallons_at_main\", \""+sGallons+"\")"); // this line of code initiates an hq report (as outlined in Part 3).
Up Next: Saving The World One Drop At A Time, Part 5: The Dashboard