Node-isassemble Johnny-Five
Artwork by Mike Sgier
![Gitter](https://badges.gitter.im/Join Chat.svg)
Bocoup. Johnny-Five programs can be written for Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, Raspberry Pi, Spark Core, TI Launchpad and more!
Johnny-Five is an Open Source, Firmata Protocol based, IoT and Robotics programming framework, developed atJohnny-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:
- Popular application libraries such as Express.js and Socket.io.
- Fellow hardware projects like ar-drone, Aerogel and Spheron
- Bluetooth game controllers like XBox Controller and DualShock
- IoT frameworks, such as Octoblu
...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
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!
NodeBots: The Rise of JavaScript Robotics
Why JavaScript?Supported Hardware
Johnny-Five has been tested on a variety of Arduino-compatible Boards.
For non-Arduino based projects, platform-specific IO Plugins are available. IO Plugins allow Johnny-Five code to communicate with any 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 > StandardFirmata
- 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/rwldrn/johnny-five.git && cd johnny-five
npm install
npm package:
Install the module with:
npm install johnny-five
Johnny-Five is...
var five = require("johnny-five"),
// or "./lib/johnny-five" when running from the source
board = new five.Board();
board.on("ready", function() {
// Create an Led on pin 13 and strobe it on/off
// Optionally set the speed; defaults to 100ms
(new five.Led(13)).strobe();
});
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.
Many fragments. Some large, some small.
Wireless Nodebot NEW!
Kinect Controlled Robot Arm NEW!
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
Example Programs
Board
- Basic Board initialization
- Board example with user defined serial port
- Multiple Boards in one program
- REPL
- Pin Component
LED
- LED Component
- LED (PCA9685)
- LED - Blink
- LED - Pulse
- LED - Fade
- LED - Fade Callback
- LED - An Array of LEDs
- RGB Component
- LED - RGB, anode
- LED - RGB (PCA9685)
- LED - Rainbow
- LED - Demo Sequence
- LED - Digital Clock
- LED - Matrix
- LED - Matrix Demo
- LED - Matrix (HT16K33)
- LED - Matrix 16x8 (HT16K33)
- LED - Sensor & Laser Trip Wire
Servo
- Servo Component
- Continuous Servo Component
- Servo - Slide Potentiometer Controller
- Servo - Prompt
- Servo - Drive
- Servo - Animation
- Servo - An Array of Servos
- Servo - (PCA9685)
Servo Animation
Motor
- Motor Component
- Motor - Directional
- Motor - Brake
- Motor - Current
- Motor (H-Bridge)
- Motor (PCA9685)
- Motor (3 pin)
- Motobot
Stepper Motor
ESC & Brushless Motor
Sonar/Ultrasonic
Button
Relay
Shift Register
Infrared (Proximity, Motion, Reflectance)
Joystick
LCD
- LCD Component
- LCD, I2C (PCF8574)
- LCD - Enumerate Characters
- LCD - Runner 20x4
- LCD - Runner 16x2
- LCD - Runner 16x2
- LCD, I2C
- LCD, I2C - Runner
Compass/Magnetometer
- Compass (HMC6352)
- Compass (HMC5883L)
- Compass/Magnetometer - Logging
- Compass/Magnetometer - Find North
- Compass/Magnetometer Component
Piezo
IMU
Sensors
- Accelerometer Component
- Accelerometer (ADXL345)
- Accelerometer (ADXLl335)
- Accelerometer (MMA7361)
- Accelerometer (MPU6050)
- Accelerometer Pan + Tilt
- Gyro Component
- Gyro - Analog (LPR5150AL)
- Gyro - I2C (MPU6050)
- Sensor - Photoresistor
- Sensor - Potentiometer
- Sensor Component
- Sensor - Force Sensitive Servo Controller
- Sensor - Slide Potentiometer
- Sensor - Slide Potentiometer Servo Controller
- Temperature (TMP36)
- Temperature (LM35)
- Temperature (DS18B20)
- Temperature (MPU6050)
Plugin Template
Grove IoT Kit (Seeed Studio)
- Grove - LED
- Grove - Button
- Grove - touch
- Grove - Sensor
- Grove - LCD RGB
- Grove - LCD RGB Temperature display
- Grove - Servo
TinkerKit
- TinkerKit - Accelerometer
- TinkerKit - Blink
- TinkerKit - Button
- TinkerKit - Continuous Servo
- TinkerKit - Combo
- TinkerKit - Gyro
- TinkerKit - Joystick
- TinkerKit - Linear Potentiometer
- TinkerKit - Rotary Potentiometer
- TinkerKit - Tilt Sensor
- TinkerKit - Touch Sensor
Wii
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 (c) 2012, 2013, 2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright (c) 2014, 2015 The Johnny-Five Contributors Licensed under the MIT license.