Artwork by Mike Sgier
Johnny-Five is an Open Source, JavaScript Arduino programming framework, developed at Bocoup.
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:
- 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
IO Plugins allow Johnny-Five code to communicate with any non-Arduino based hardware in whatever language that platforms speaks! For non-Arduino based projects, the following platform IO Plugins are available:
- Beagle Bone
- Intel Galileo
- Pinoccio
- Raspberry Pi
- Spark Core
- LightBlue Bean
- IO Board (Generic IO Plugin class to make your own!)
Why JavaScript? NodeBots: The Rise of JavaScript Robotics
Documentation for the Johnny-Five API can be found here
For step-by-step examples, including an electronics primer, check out Arduino Experimenter's Guide for NodeJS by @AnnaGerber
Here is a list of prerequites for Linux, OSX or Windows.
Check out the bluetooth guide if you want to remotely controll your robot.
- 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.
git clone git://github.com/rwldrn/johnny-five.git && cd johnny-five
npm install
Install the module with:
npm install johnny-five
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.
Wireless Nodebot NEW!
- Servo
- Servo Continuous
- Servo Sweep
- Servo Slider
- Servo Prompt
- Servo Keypress
- Servo Drive
- Servo Animation
- Servo Diagnostic
- Servo Array
- Boe Test Servos
- Led
- Led On Off
- Led Strobe
- Led Pulse
- Led Fade
- Led Fade Callback
- Led Digital
- Led Analog
- Led Status
- Led Array
- Led Rgb
- Led Rgb Anode
- Led Rainbow
- Led Demo Sequence
- Led Matrix
- Seven Segment
- Laser
- Accelerometer
- Accelerometer Pan Tilt
- Gyro
- Photoresistor
- Photoresistor Servo
- Potentiometer
- Sensor
- Sensor Fsr Servo
- Sensor Fsr
- Sensor Ir Led Receiver
- Sensor Slider
- Slider Log
- Slider Pan
- Slider Servo Control
- Sensor Temperature Tmp36
- Sensor Temperature Lm35
- Tinkerkit Accelerometer
- Tinkerkit Blink
- Tinkerkit Button
- Tinkerkit Continuous Servo
- Tinkerkit Combo
- Tinkerkit Gyroscope
- Tinkerkit Joystick
- Tinkerkit Linear Pot
- Tinkerkit Rotary
- Tinkerkit Thermistor
- Tinkerkit Tilt
- Tinkerkit Touch
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.
Copyright (c) 2012, 2013, 2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright (c) 2014 The Johnny-Five Contributors Licensed under the MIT license.