As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Wednesday, June 10, 2015

The Pi Problems // Maddy Harrison & Ben Schiffler

Ah, the last and most tricky piece of software. In order to get all of our code working, we heavily relied on the GardenBot website, which had a TON of useful information on getting our readings to work effectively and efficiently. However, we didn't have a great source on how to get our Raspberry Pi working with the arduino, the sensors, and twitter. So, we turned to google!


Which led us to "Parky's Place", and his garage-flood-monitoring system. The gist is, a guy had his garage flood all the time - except when he was trying to find out where the water was coming from. So, he hatched a plan - he built an arduino with a moisture sensor and hooked it up to a raspberry pi, so that it would notify him via twitter and SMS whenever moisture was detected.  You can see from the system diagram above that he had a very similar flow to us, and so we were able to poke through his code and get an idea of how we could build our system.


And that's when we ran into our first stumbling block: setting up the Raspberry Pi. The Pi is imaged off of an SD card, which we had to unmount and rewrite to use "Raspbian", a Raspberry Pi based version of Linux. This was super tricky because unfortunately there's a bug in Mac OS's, where if you put in an SD card, sometimes it will be "read only". We used a hacky fix described here, which require you setting the "lock" on the SD card to be only halfway, which ended up working (after much annoyance).


After reimaging the card, we had to figure out a way to connect to the Raspberry Pi. We couldn't remotely connect because of WiFi issues on the UW campus, and we didn't have a spare screen and monitor with HDMI to program via the Pi itself, so we attempted our second hacky solution, described in the second diagram above and this website: Connecting directly via SSH using an ethernet port and internet sharing straight from the laptop.

It ended up working great (after much tweaking) and we wrote a slick python script in Vi (via SSH). It also was our third hacky solve - to bypass lots of event handling, we just set the script to trigger whenever we output a keyword to the console from the Arduino, which was watched constantly by the Pi. This was a similar solution to how the garage-flood-monitoring system worked, with some adjustments for our specific case.

All in all, a very hacked-together but totally working solution!

No comments:

Post a Comment