Build Robots with Web Tech.





Today.


What you think you need


  • Knowledge of C
  • Advanced Electronics Knowledge
  • $$$



But If you can...


  • Use a callback
  • Install Node/npm
  • Use a command line
    • cd, ls, node

You (Yes, you) Can build, and program, Robots. 


Right now.

A Bit of Vocabulary

Microcontroller

This is the nerve center/brain of your robotics projects. Signals are passed through it via code, GPIO devices, etc.

A Bit of Vocabulary


GPIO - General Purpose Input/Output


Also referred to as 'GPIO Pins' or 'Pins', these are usually little plastic slots or holes in a board.


These are how your microcontroller and input/output devices communicate

A bit of Vocabulary


Analog vs. Digital pins


Digital pins have 2 possible values: hi/low (on/off)


Analog pins have a range of values (represented by an integer, usually)

A Bit of Vocabulary


Serial Connection


A serial connection is used for your computer to communicate with your microcontrollers.


This is done through your USB ports, usually.

Basic Wiring 101

Output: IO Pin -> resistor -> output -> ground

Input: power -> resistor -> input
input-> ground
input-> analog input pin



You now know everything about electronics that I do.

The hardware





Arduino with Johnny-Five
BeagleBone Black
Espruino
Firefox OS

Johnny-Five

Basic Stats


Ubiquitous with 'NodeBots'


Uses Arduino with Firmata firmware


Arduino: Open-Source robotics platform


https://github.com/rwaldron/johnny-five

Demonstration


2 servos, linked to radial potentiometers (slider switches).


The servos move when I move the potentiometers


Pros



  • Easiest starting point
  • Prolific Documentation
  • Strongest, most unified community
    • @rockbot and @rwaldron



Cons


  • Must be tethered to a comp running Node
    • Some get around this with a raspberry Pi


Beaglebone Black

Basic Stats

Fully-autonomous microcontroller running Linux


You've probably heard of its cousin- Raspberry Pi


Node.JS baked right in- including Cloud9 editor


A few advantages over Pi

  • Analog Output pins
  • Does not require external display



Demonstration

Load up Cloud9 on the BeagleBone

Manipulate an RGB LED

Pros




  • Autonomous
  • Easy to get started
  • Extendable (wifi, usb devices)
  • Runs Node on the device

Cons




  • A little hard to get
  • Documentation not as prolific as J5
  • Updating is kind of a pain

Espruino

Basic stats



Runs a custom JS Interpreter


Runs JS directly- no message-passing, no linux


Cheap, small, good for wearables


Demonstration



An individually-addressable RGB LED Strip is attached to the Espruino


(The arduino is serving as a power converter)


Let's light it up.

Pros



Firmware updates regularly


Some functionality that's not as available with the others


Small, cheap, fast

Cons



Highly experimental


Currently on pre-order


Needs to be modified to allow prototyping

Other stuff you can do with Node

Nodecopters


Even MOre Stuff




  • Node-Gamepad
  • Node SerialPort
    • For devices not supported yet
  • Firefox OS!!! (Small Demo)
  • Many, many more.

How to get started



Arduino Kit (SparkFun Inventor's)


Go check out Johnny-Five tutorials


Build something simple, then scale up

What comes next is very, very, very important.



Document.

Document.

Document.

Document your builds



Even if it goes smoothly


Someone will learn something from it!


This is the easiest way to help the community.

 

Especially when your build doesn't go as planned.
Someone might need info about your fix!


Because Happiness is contagious




in Conclusion



IT's (always) a great time to be a fan of JS

Tag, You're It!




  • Go build it (Because you can!)
  • Document it
  • Show it off

Questions?


I'll leave the bots up here for a bit if you want to come look.


@kassandra_perch

kassandra@ kassandraperch.com

@RetailMeNot


Slides:

https://slid.es/kperch/build-robots-with-web-tech

Build Robots with Web Tech

By kperch

Build Robots with Web Tech

  • 1,596