Dash Robotics

My Account

MakerFaire, and an API for Dash

Hi everyone!

This Sunday I made my way out to MakerFaire, to give a talk on Dash's technology and his potential for changing robotics education. It was a lot of fun, and there was plenty of cool stuff to see, like this fire-breathing octopus.

In case you didn't notice, there is a little girl at the bottom of the video who really didn't like that thing.

We also saw this awesome cardboard elephant, that you could drive with a bike!

After walking around, I gave my talk, and a lot of people got to see Dash close up. Everyone was really interested and had great questions.

Since MakerFaire, we've been hard at work on Dash's API, or Application Programming Interface. This sounds fancy, but all it means is that we've made Dash really easy to program. Of course, Dash will work right out of the box with our free iOS app. If you don't want to write a single line of code, Dash will still be an awesome toy with all kinds of cool features and behaviors. However, if you'd like to program Dash yourself, read on...

We've written several functions that will make it easy to drive Dash, read his sensors, blink his lights, detect collisions, and more. Even if you're a programming novice, you shouldn't find Dash too difficult. If you're already an Arduino pro, you'll see you only need a few lines of code to get things done.

The way we do this is by writing what are called libraries, that the user can call to perform a function. The idea is to give the programmer the "what" without he or she having to know "how."

For example, lets say you want to see if Dash has collided with something on his left side. Usually you would have to write code to get a sensor baseline reading, then find the current sensor reading, compare them, and check if a collision has occurred. With the API, you just write:


If there is a collision, this statement will be true. If not, it will be false. This compresses the code a lot, makes it really easy to read, and makes programming faster and more fun. 

For another example, let's say you want to make Dash run and turn. We're taking code that looks like this:

and compressing it so you just have to write something like this:

You just include the library (Dashbot.h), and then you have access to all kinds of functions to program Dash. dashRun let's you specify a power for Dash's motors, and also controls how fast Dash turns. If you're creative, you can probably make him dance with only a few more lines of code. 

Thanks for reading! Next week we'll have more updates, including (hopefully) a cool new laser cutter...



Leave a comment