johnny-five
    Overview
    Alternatives
    Playground
    Insights & Analysis
    Issues
    Versions
    Documentation
    Find an Expert
    Dependencies
    Career Opportunities
    Code

johnny-five

The JavaScript Robotics and Hardware Programming Framework. Use with: Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!

1.3.0  •  Published 14 days ago  •  by Rick Waldron  •  MIT License

Johnny-Five

The JavaScript Robotics Programming Framework

Artwork by Mike Sgier

Travis Build Status Appveyor Build Status Coverage Status Install Size Gitter

Johnny-Five is an Open Source, Firmata Protocol based, IoT and Robotics programming framework, developed at Bocoup. Johnny-Five programs can be written for Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!

Johnny-Five has grown from a passion project into a tool for inspiring learning and creativity for people of all ages, backgrounds, and from all across the world.

Just interested in learning and building awesome things? You might want to start with the official Johnny-Five website. The website combines content from this repo, the wiki, tutorials from the Bocoup blog and several third-party websites into a single, easily-discoverable source:

  • If you want to find the API documentation, that’s right here.
  • Need to figure out what platform to use for a project? We put that stuff here.
  • Need inspiration for your next NodeBot? Check out the examples.
  • Want to stay up-to-date with projects in the community? Check this out.
  • Need NodeBots community or Johnny-Five project updates and announcements? This is what you’re looking for.

Johnny-Five does not attempt to provide “all the things”, but instead focuses on delivering robust, reality tested, highly composable APIs that behave consistently across all supported hardware platforms. Johnny-Five wants to be a baseline control kit for hardware projects, allowing you the freedom to build, grow and experiment with diverse JavaScript libraries of your own choice. Johnny-Five couples comfortably with:

…And that’s only a few of the many explorable possibilities. Check out these exciting projects: node-pulsesensor, footballbot-workshop-ui, nodebotui, dublin-disco, node-slot-car-bot, servo-calibrator, node-ardx, nodebot-workshop, phone-home, purple-unicorn, webduino, leapduino, lasercat-workshop, simplesense, five-redbot, robotnik, the-blender

Why JavaScript? NodeBots: The Rise of JavaScript Robotics

Hello Johnny

The ubiquitous “Hello World” program of the microcontroller and SoC world is “blink an LED”. The following code demonstrates how this is done using the Johnny-Five framework.

var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {
  // Create an Led on pin 13
  var led = new five.Led(13);
  // Blink every half second
  led.blink(500);
});

Note: Node will crash if you try to run johnny-five in the node REPL, but board instances will create their own contextual REPL. Put your script in a file.

Supported Hardware

Johnny-Five has been tested on a variety of Arduino-compatible Boards.

For non-Arduino based projects, a number of platform-specific IO Plugins are available. IO Plugins allow Johnny-Five code to communicate with any non-Arduino based hardware in whatever language that platforms speaks!

Documentation

Documentation for the Johnny-Five API can be found here and example programs here.

Guidance

Need help? Ask a question on the NodeBots Community Forum. If you just have a quick question or are interested in ongoing design discussions, join us in the Johnny-Five Gitter Chat.

For step-by-step examples, including an electronics primer, check out Arduino Experimenter’s Guide for NodeJS by @AnnaGerber

Here is a list of prerequisites for Linux, OSX or Windows.

Check out the bluetooth guide if you want to remotely control your robot.

Setup and Assemble Arduino

  • Recommended Starting Kit: Sparkfun Inventor’s Kit
  • Download Arduino IDE
  • Plug in your Arduino or Arduino compatible microcontroller via USB
  • Open the Arduino IDE, select: File > Examples > Firmata > StandardFirmataPlus
    • StandardFirmataPlus is available in Firmata v2.5.0 or greater
  • Click the “Upload” button.

If the upload was successful, the board is now prepared and you can close the Arduino IDE.

For non-Arduino projects, each IO Plugin’s repo will provide its own platform specific setup instructions.

Hey you, here’s Johnny!

Source Code:

git clone git://github.com/rwaldron/johnny-five.git && cd johnny-five

npm install

npm package:

Install the module with:

npm install johnny-five

Example Programs

To get you up and running quickly, we provide a variety of examples for using each Johnny-Five component. One thing we’re especially excited about is the extensive collection of Fritzing diagrams you’ll find throughout the site. A huge part of doing any Johnny-Five project is handling the actual hardware, and we’ve included these as part of the documentation because we realised that instructions on how to write code to control a servo are insufficient without instructions on how to connect a servo!

To interactively navigate the examples, visit the Johnny-Five examples page on the official website. If you want to link directly to the examples in this repo, you can use one of the following links.

There are presently 360 example programs with code and diagrams!

Board

LED

LED: RGB

LED: Digits & Matrix

Servo

GPS

Servo Animation

Color

Motor

Stepper Motor

ESC & Brushless Motor

Button / Switch

Keypad

Relay

Shift Register

Infrared Reflectance

Proximity

Motion

Joystick

LCD

Compass/Magnetometer

Piezo

IMU/Multi

Sensors

Expander

Photon Weather Shield

Lego EVShield

Intel Edison + Grove IoT Kit

Grove IoT Kit (Seeed Studio)

Micro Magician V2

TinkerKit

Wii

Complete Bots / Projects

Component Plugin Template

IO Plugins

Many fragments. Some large, some small.

Wireless Nodebot

Kinect Controlled Robot Arm

Biped Nodebot

LCD Running Man

Slider Controlled Panning Servo

Joystick Controlled Laser (pan/tilt) 1

Joystick Controlled Laser (pan/tilt) 2

Joystick Controlled Claw

Robot Claw

Joystick, Motor & Led

Build you own drone

Make: JavaScript Robotics

Contributing

All contributions must adhere to the Idiomatic.js Style Guide, by maintaining the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

License

Copyright © 2012, 2013, 2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright © 2014, 2015 The Johnny-Five Contributors Licensed under the MIT license.

Dependencies

chalk  ·  color-convert  ·  ease-component  ·  lodash.clonedeep  ·  lodash.debounce  ·  nanotimer  ·  temporal  ·  browser-serialport  ·  firmata  ·  serialport  ·  async  ·  common-tags  ·  copy-paste  ·  coveralls  ·  grunt  ·  grunt-cli  ·  grunt-contrib-jshint  ·  grunt-contrib-nodeunit  ·  grunt-contrib-watch  ·  grunt-jsbeautifier  ·  grunt-jscs  ·  keypress  ·  mock-firmata  ·  nyc  ·  optimist  ·  sinon

Tags

0A02
0A21
16x2 LCD
20x4 LCD
2D120X
2Y0A02
2Y0A21
74HC595
ADXL335
ADXL345
ALS-PT19
ALSPT19
ANALOG
arduino
Ardumoto
AT42QT1070
BLINKM
BMP180
Continuous Rotation
DEFAULT
Diffused LED
DS18B20
Edison Arduino Block
Edison GPIO Block
Edison I2C Block
Edison PWM Block
edison
ESPLORA
EV3
firmata
galileo-io
galileo
GP2D120XJ00F
GP2Y0A02YK0F
GP2Y0A21YK
GP2Y0A41SK0F
GY-521
GY521
HD44780
High Torque
Hitec HS-35HD
Hitec HS-422
Hitec HS-425BB
Hitec HS-625MG
Hitec HS-646WP
Hitec HS-755HB
Hitec HS-805BB
Hitec HS-85MG
HMC5883L
HMC6352
Hobby Motor
HRLV-MaxSonar-EZ0
HT16K33
HTU21D
i2c
Infrared Proximity Sensor
Infrared Sensor
intel edison
intel galileo
ISL29125
JHD1313M1
Joystick
Joystick
LCD1602
LCD2004
LCM1602
LED
LIDAR-Lite v2
Ludus Protoshield Wireless
Ludus Protoshield
LV-MaxSonar-EZ0
LV-MaxSonar-EZ3
MCP23008
MCP23017
MCP9808
Metal Gear
MJKDZ
MMA7361
MMA7660
MMA8462Q
MPL115A2
MPL3115A2
MPR121
MPR121QR2
MPU-6050
MPU6050
MUXSHIELD2
NXT
OA41SK
PARALLEL
particle
PCA9685
pcduino
PCF8574
PCF8574A
PCF8574AT
PCF8574T
PCF8575
PCF8591
photon
PIR Motion Sensor
QTOUCH
raspberry pi
raspberry pi
raspberrypi
raspi-io
RedBoard
RGB LED
robot
robotics
rpi
serial
serialport
Servo
Shift Register 8-Bit SN74HC595
Shift Register
SI7020
spark core
spark-io
spark
SparkFun Essential Sensor Kit
SparkFun Sensor Kit
Speed controller
Temperature
tessel 2
Thumb Joystick
TINKERKIT
TMP36
TSL2561
Ultrasonic Range Finder
usb
VKEY
Weather Shield Arduino
Weather Shield Photon
Get a weekly digest of your favorite packages
We track new versions of your favorite packages, read the changelogs, and summarize them - so you dont have to
Just $5/month per user

Popularity

Weekly Downloads
1.0K
Stars
10.7K

Issues and PRs

Activity

Last ver 14 days ago
Created 7 years ago
Last commit 1 month ago
1 day between commits

Sustainability

59 contributors

Technology

Node version: 10.15.3
768.2K unpacked

Legal and Compliance

MIT License
OSI Approved
0 vulnerabilities

Top Experts

Rick Waldron
Maintainer, 710 commits, 320 merges, 25 PRs
Works at Bocoup
dtex
Maintainer, 64 commits, 37 merges, 77 PRs
John Lennard
56 commits, 3 PRs
Works at GravitateNZ
dnlup
38 commits, 9 PRs
Lyza Danger Gardner
Maintainer, 22 commits, 1 merges, 9 PRs
Francis Gulotta
Maintainer, 3 commits, 12 merges, 22 PRs
Works at bustle