NodeBots Day is world wide event where people learn how to control the physical world with JavaScript. It is designed to break down some of the assumed barriers that traditional web developers may have when it comes to programming hardware devices. Through activities like SumoBots, attendees can go from zero experience to a fully controllable robot in as little as an hour.

The multi-eyed SumoBot named, “The Punisher”

Thanks to conferences like RobotsConf and JSConf, I have experienced the excitement of watching software developers discovering that their world isn’t constrained to just the browser. As organizer of Sacramento’s JavaScript meetup, I was excited to bring this experience to our fledging community. But while I had watched others discover they could control hardware, I had never actually done it myself! So before I could feel confident in running an event like this, I first needed to teach myself that I could control hardware with JavaScript.

Teaching myself to teach others

Thankfully, my awesome co-worker Linda has experience in both working with hardware as well as running a NodeBots Day event in her hometown of Norfolk. She had pieced together a list of every component needed to built a basic SumoBot at the cheapest prices possible. This allowed me to blindly dive into the world of hardware while keeping a reasonable budget for the event and keeping the cost down for our attendees.

SumoBot Kits ready for assembly!

SumoBot Kits ready for assembly!

We ended up being so under budget that we were able to splurge on individual plastic storage cases to hold each attendees bot parts as well as a set of precision screwdrivers. DollarTree turned out to be a surprisingly useful resource for event materials. We were able to get the aforementioned storage cases and screwdrivers along with crafting materials and additional sets of scissors and pliers all for just $1 a piece!

If you can use jQuery, you can program a robot!

Once all of the parts had arrived, I jumped into building out my own SumoBot in preparation for the big day. Assembling the bot itself is incredibly easy and before I knew it, it was time to start writing code. Most NodeBot events use the Johnny-Five library as it makes programming Arduino’s, et al, incredibly easy. In fact, I used that as part of our event marketing, “If you can use jQuery, you can program a robot!”

I wanted to take a measured approach to learning about how to program the Arduino rather than jumping straight to SumoBot controls. I did this so that I could take notes on my own experiences and turn them into a lesson plan for attendees. This way, they could learn at their own pace on a series of lessons that eased them into the hardware world.

I started with the hardware equivalent of the “Hello World” program, blinking an LED. Each lesson focused on a very small piece of functionality that would then be used to control the robot. While controlling LEDs aren’t required by the SumoBot, started with something as simple as that is a way of ensuring that the student’s development environment and connect Arduino micro-controller are configured properly.

Attendees pair up to work through their SumoBot design
Attendees pair up to work through their SumoBot design

Attendees pair up to work through their SumoBot design

Once that is out of the way, the attendees were guided towards controlling a servo which provides their first exposure to add-on Arduino components and digital I/O. The servo is also used as an optional weapon during SumoBot battles. Connecting and controlling the main drive motors were used as the next step because the wiring is just a teeny bit more involved.

This then naturally led to a more open ended exercise of controller each motor through the keyboard. The provided lesson plans included a well documented code that guided the student thought he most basic of functionality and left them with a few challenges they could do on their own, encouraging them to read the Johnny-Five API documentation as well as relying on their existing programming capabilities.

On the day of the event, an un-scientific survey showed that only 10% of attendees had any previous hardware experience. Despite so many newcomers, we only ran into a tiny set of issues:

  • Our event space blocked non-HTTP traffic. This prevented NPM from installing GitHub-based dependencies. Thankfully, a near-by Round Table Pizza had an open WiFi hotspot, so we temporarily switched to that to install the required dependencies
  • Some Windows users had issues flashing their Arduino. Attendees were able to help each other and troubleshoot the problem on their own
This creative SumoBot has spiked tires, a wicked-fast spinning wood blade, and plays "The Imperial March" through an on-board piezo speaker

This creative SumoBot has spiked tires, a wicked-fast spinning wood blade, and plays “The Imperial March” through an on-board piezo speaker

It was only a couple of hours before I heard the first “Johnny Five is alive!” come from the crowd of attendees. Shortly after that, the whirring sounds of the first motor to come to life could be heard. As more and more attendees go their bots assembled, that lone whir grew into cacophony of noise. Before I knew it, there were bots scurrying all over the place, popsicle sticks and pipe-cleaners were strewn about, and people were smiling from ear to ear as their bots came alive.

An attendee taking advantage of the optional Learn to Solder class

An attendee taking advantage of the optional Learn to Solder class

In order to keep the learning curve gentle, the bot design we used was entirely plug-and-play. This meant that no one needed to learn anything about soldering or resistors. However, for those that were looking to take their skills to the next level, one of our sponsors provided an optional Learn to Solder class that could take someone from zero soldering experience to a functional understanding of the basics in just 20-minutes.

It’s Battle Time!

At the end of the event, it was time to battle the SumoBots! The rules are pretty simple, push other bots out of the ring until there is only one left. But when I asked for volunteers, no one offered to volunteer their laser-cut child up as tribute to the SumoBot Gods. However, after a round or two, everyone realized there was nothing to be afraid of and we had everyone eager to show off their creation and laughing about the everyone’s successes and failures.

When SumoBots Attack!
When SumoBots Attack!
When SumoBots Attack!
When SumoBots Attack!
When SumoBots Attack!

When SumoBots Attack!

All along the way, we encouraged all attendees to be pragmatic in solving their challenges. This is a fun learning event, so there is no reason to get hung up on pretty code or construction perfection. Just make it work!

I’d like to thank our sponsors for enabling such a successful event: