What do you get when you cross Node.js with a Parrot AR.Drone 2.0? Hours and hours of geeky, geeky fun! I love Node, and I’m a guy so obviously I love gadgets, so this was a match made in heaven. NodeCopter is a day where small teams program flying robots to do their evil bidding. Mwuhahahaha!
It was an early start at TechHub Manchester, and I was definitely more than a little excited about getting my hands on one of those drones! Intro and safety briefing though first, from the oh so talented Andrew Nesbitt. Keeping your hands away from the rotors is harder than it sounds when you’re trying to catch a falling or otherwise wayward drone, and they really do hurt when the two meet!
I started with accessing the drone’s events, which fire out a raft of information from it’s gyroscope, accelerometer, magnetometer, ultrasound and pressure sensors. This drone is kitted out! I used the altitude reading to set the drone to hover at a specific height.
At this early stage in the day there were drones
flying crashing everywhere, mainly after hitting the beams in the loft space of the TechHub. Beams and pitched ceilings are great, except when you’re trying to fly a drone programmatically. I quickly realised that I needed a kill command to land the drone in case it started going AWOL. Another team setup a ‘clap to land’ feature, using the microphone on their laptop. Much easier than running
node land.js from the terminal.
Given the architecture of the room it’s hardly surprising that people were looking at safety features. I decided to elaborate on my altitude control by adding impact detection. If the drone was attempting to reach the set altitude and hit an obstacle it would reduce it altitude to below the obstacle then attempt to reach the set altitude after five seconds. I also added a feature so that if you held the drone near the ground it would automatically land.
There were some pretty cool things that other people managed to do, including a banana-seeking drone and iPhone accelerometer control. Simon managed to get a Wiimote hooked up and controlling a drone too, which was pretty damned good!