On March 6th – 8th 2016 I participated in StudentHack IV in Manchester
At hackathons I generally make a rule for myself to create the craziest, maddest thing… so naturally when I saw the challenge from Github to create a Developer tool; I decided to create an Aloe Vera plant that when touched activates developer macros and scripts on your computer!
So I needed some sensors, a microcontroller, software that can isolate inputs and produce dynamic outputs, and a script on your computer that can be triggered.
“Intel Edison can go to Hell!”
I reluctantly decided to use the Intel Edison from the MLH Hardware Lab, I say reluctantly by this point because the Intel Edison has destroyed 3 Hackathon projects now. Due to either firmware updating, booting loops, connection issues and WiFi and OS incompatibility! This time I couldn’t reflash the OS and the connection was flakey. I even had to hack the install script because it wasn’t supposed to work for Ubuntu 15.10 even though when I MANUALLY WENT INTO THE INSTALL SCRIPT and replaced every mention of 15.04 to 15.10… it worked…SURELY THAT SHOULD’NT ACTUALLY WORK! so naturally I gave up on the Edison, 8 hours in. Never again. Its failed me too many times…
Time to use the good old trusty Arduino!
“So how can I make it touchable?”
Inspired by this project for the sonification of plants, I thought a psychogalvanometers which are “sensors attached to leaves using sliver electrodes and conductive paste, that sense subtle changes in electric conductance across the leaf surface” which would be the most suitable way to detect different positions of touch on the plant.
Then I realised… I’m at a hackathon where I have non of the materials to do this!
so after many trips to the Maplin around the corner I decided to use the vibration sensors found at the MLH Hardware Lab at the Hack.
“Where the heck do I get an Aloe Vera plant on a Sunday in the middle of Manchester?!”
I chose to use an Aloe Vera plant when I was going to use a psychogalvariometer, due to its water content and thus better detection and also its very separate leaves to allow for easily distinguished input.
Luckily it was Mothers Day, so a quick stroll into the centre of Manchester I found a boutique florist where I picked up a small Aloe Vera plant and advice on how to wire it up!
Unfortunately, the Aloe Vera turned out to be the worse choice after I chose to use vibration sensors, due to its rigidity and how vibrations would permeate through to the other leaves.
“Vibration sensor calibration requires a large bottle of whiskey…”
I quickly found vibration sensors requires the patience of a dedicated sloth enthusiast. ‘calibrate, test, calibrate, test, calibrate, test… oh fuck…the first one isn’t calibrated any more’. When I FINALLY had them all functional, just functional, not working. I devised an algorithm to improve vibration isolation that would compare all the other vibration sensors and take the reading of the sensor with the highest reading above the threshold limit. This helped overcome the fact I had bought the biomechanically worst organism in existence to isolate touch with vibration.
“Arduino as a HID?”
So now I have a device taking a tactile input and producing an assigned integer, how do I take that integer and make it express something. I decided I would do that on the computer side to maintain the devices many out possibilities. Before any of that, I needed to make the Arduino into an HID device. Now this is where everything starts to fail. I can’t flash the HID firmware onto the on-board ATmega32 microcontroller… So I give up on that for a bit.
“To wifi or not to wifi?”
Now how do I connect the plant to the computer. USB, Bluetooth, Wi-Fi. I had forgotten my trusty HC-07 at home, so a Maplin trip left me with a bluetooth shield so very very bad. The documentation was awful and to pair with a computer required a client that… did’nt run on Linux… Right.
Ok then… Wifi… oh wait you tried that one with the Edison and you don’t have an ESP8266… Screw that.
USB it is… oh wait… I can’t make it a HID… Fuck.
“Hell yer I won Mona the Octocat… How did that happen!”
So after having a half finished hack that only succeeded at half its functionality… sort of actually won that prize!
The insanity and one man ambition to do something a little random, just because we can, won that weekend.
It was a good weekend.
P.S. To all the friends and beautiful people I have met at Hackathons over the past two years, you changed my life. Thanks.
Share this Post