What just happened? This weekend, the sensor project idea got picked up at a hackathon, gained a whole team of technologists, and is on its way to wirelessly transmitting data to a website with a fully functional database. My first hackathon was a blur of activity, and that’s probably an apt working definition of a hackathon. But for accuracy’s sake, here’s the background on this weekend’s event:
TechCamp is a U.S. State Department program that connects technologists (I don’t like this word, btw) to people who are trying to solve social problems. Many of the previous TechCamps took place in cities in developing countries, and as far as I’m aware this is the first domestic event. It’s a sign of the times: Co-sponsored by the School District of Philadelphia and Technically Philly, this hackathon focuses on our city’s public schools and finding ways to use technology to improve education and administration. The two-day hackathon—the part where programmers and software developers work on a project, such as a mobile app for students—was only one element of TechCamp, but it was the part that enabled the Solar Sunflower project to grow some legs.
In democratic fashion, the hackathon at Drexel University’s URBN Center began with people contributing project ideas to a whiteboard; groups formed based on interest and requisite skill sets. (Special thanks to Paul Fugazzotto, from PWD public affairs, for attending the first day and helping to generate interest for the sunflower.) I was lucky to get hooked up with three really talented programmers: Christopher Nies, a Python developer; and Kevin Clough and Jason Blanchard, both of whom do development with Ruby on Rails (more on that shortly). Here’s some of our team working in the foreground this weekend:
After I explained the project and gave some background information, Chris, Kevin and Jason had a plan of attack in place within minutes: We’re going to send JSON packets containing sensor data over wifi from the Arduino to a Ruby on Rails application running on Heroku. You got that, right?
Now the most difficult part (for me, at least): Ruby on Rails. Ruby is a programming language, like Python or PHP or C++. Rails, on the other hand, requires a little more explanation. It is a web application framework that runs on Ruby. Oh right, a “web application framework.” I’m sure the finer points of Rails will reveal themselves in time, but for now I’m satisfied to know that it provides a way to build websites quickly, using less code than other approaches. (Full disclosure: Although I do consider myself a novice at programming, I have experience with HTML, CSS and other website-related things.)
Heroku is a cloud hosting platform. It’s a place to put a website. It’s free, up to a certain point of usage. This makes it a smart choice for projects under development.
Most of the progress made during the hackathon involved getting the server and website set up, programming the Arduino to talk to the server, and wiring up the sensors. Throughout, we had many people—educators, scientists, students—stop by our table to learn about the project. While I mainly preached the gospel about green infrastructure and stormwater management to our many visitors, Kevin, Chris and Jason did the heavy lifting on the tech side. Here’s a shot of our setup:
In the photo above, we have three soil moisture sensors wired to a breadboard (a plug-in board that lets you connect circuits without soldering wires) and connected to a Bluetooth shield. We ended up not using Bluetooth to transmit data; to the right of the breadboard is an Arduino and Ethernet shield that provides a better way to connect to the web. (Connecting via wifi is on the to-do list; we just wanted to test our connections to the server and Heroku site.)
Even though I arrived with a duffel bag full of electronics—Arduinos, sensors, breadboards, cables—at one point I had to steal away to Radio Shack to buy the Ethernet shield for the Arduino. It cost around $20. Now, I’ve become a semi-regular customer at various local Radio Shacks since embarking on this project, and I’ve never underestimated the base-level weirdness of the Shack’s clientele. But this time was special: A lady, perhaps thinking I worked at the store, asked me which digital converter box would scramble signals from her TV … because the people from the TV were accessing her brain and stealing her thoughts.
But I digress. Our team wasn’t able to do a live demo of the sensors transmitting data to the web, but we gave a solid closing-night presentation in front of a great audience of educators and the tech community. Best of all, the team resolved to keep working on the project, and we’ll get together at Code For Philly meetups in the future. More than anything, I was astonished at the level of interest and support for this project and hope to keep the momentum going.