Tide Book

I’m working on a notebook about tides and tidepools with a Spark Core inside to retrieve data about the latest tide levels. It works, hooray! (I say working on because I’m still adding to the notebook, which documents me learning both about tides and about the technical details of getting the wifi and electronics parts working :). There was this rather fun moment when it was finally receiving live tide data when it felt like the book suddenly came alive and became connected to the world – not in the social media, always-connected kind of way, but as though there was a thread tying it to a real thing far away.

Photos below by Jennifer Dick of Nexmap and the 21st Century Notebooking project. More documentation here, with more complete photos.

Here’s what I liked about the Spark Core:

  • Really nice and small, fits quite well into a notebook.
  • It’s quite fast to get up and running.
  • Unlike the Electric Imp, it works with Arduino (in a web IDE), so I could build on what I know, and prototype the electronics part without the Spark Core itself.

Here’s my wish list:

  • Right now Spark Core programs won’t run unless it can connect to the network, which means I can’t program in a default behavior for the notebook that runs before it can connect. This made me realize just how automatically I build in a backup behavior into things I make – a lesson learned from having so many demos fail! So it’s a bit frustrating not being able to build this in – but it sounds like they are working on it.
  • Some networks just don’t work. I do realize that for something like the notebook that I want to be able to move from place to place, a Bluetooth-tethered-to-phone solution would be better.
  • I wish they didn’t pre-solder header pins on! Much easier for paper electronics things, and other types of flexibility.
  • After poring over a lot of documentation, it seems like you can use a web call to run functions on the Spark Core, and you can subscribe to events like sensor readings, but you can’t actually have it retrieve data from the web on its own. To update the Tide Book with the latest tide readings, I created a cron job that runs on my server and runs a function on the Spark Core that changes the tide reading, which then controls the number of LEDs that fade in and out like waves. It makes much more sense to me that the microcontroller would be able to make its own requests and pull data rather than push it like this, so I’m not super happy with this solution. I very well may be missing something about the way this device works – especially because I’m not hugely experienced with web programming, and this project involved a lot of cobbling the bits I know together. Update! a helpful engineer at the Spark Core booth at Maker Faire pointed me to TCPClient, which I think is exactly what I needed. Some documentation here. More updates once I try this.