Installations
npm install johnny-five
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.17.1
NPM Version
6.14.13
Score
63.4
Supply Chain
97.6
Quality
71.7
Maintenance
100
Vulnerability
98.6
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (99.26%)
C++ (0.62%)
HTML (0.12%)
Developer
Download Statistics
Total Downloads
1,411,961
Last Day
195
Last Week
1,210
Last Month
7,136
Last Year
88,757
GitHub Statistics
13,324 Stars
3,368 Commits
1,766 Forks
454 Watching
17 Branches
135 Contributors
Bundle Size
264.77 kB
Minified
77.26 kB
Minified + Gzipped
Package Meta Information
Latest Version
2.1.0
Package Id
johnny-five@2.1.0
Size
146.12 kB
NPM Version
6.14.13
Node Version
14.17.1
Publised On
06 Jul 2021
Total Downloads
Cumulative downloads
Total Downloads
1,411,961
Last day
-16.3%
195
Compared to previous day
Last week
-5.8%
1,210
Compared to previous week
Last month
31.2%
7,136
Compared to previous month
Last year
-10.5%
88,757
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
9
Dev Dependencies
16
Optional Dependencies
3
Johnny-Five
The JavaScript Robotics Programming Framework
Artwork by Mike Sgier
Johnny-Five is an Open Source, Firmata Protocol based, IoT and Robotics programming framework, developed by the Nodebots Community. 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.
- 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:
- 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
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.
1const { Board, Led } = require("johnny-five"); 2const board = new Board(); 3 4board.on("ready", () => { 5 // Create an Led on pin 13 6 const led = new Led(13); 7 // Blink every half second 8 led.blink(500); 9});
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:
1git clone git://github.com/rwaldron/johnny-five.git && cd johnny-five 2 3npm install
npm package:
Install the module with:
1npm 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 362 example programs with code and diagrams!
Board
- Board - Basic Initialization
- Board - Cleanup in 'exit' event
- Board - Multiple in one program
- Board - Specify Sampling Interval
- Board - Specify port
- Custom Data Properties
- Pin
- REPL
LED
- LED
- LED - Blink
- LED - Demo sequence
- LED - Fade
- LED - Fade callback
- LED - Fade with animation
- LED - PCA9685
- LED - Pulse
- LED - Pulse with animation
- LED - Slider
- LED - Tessel Servo Module
- LEDs - An array of LEDs
- LEDs - Controlling an array of LEDs
LED: RGB
- LED - RGB (Common Anode)
- LED - RGB (Common Anode) PCA9685
- LED - RGB Intensity
- LED - Rainbow
- LED - Rainbow BlinkM
LED: Digits & Matrix
- LED - Digital Clock
- LED - Digital Clock, Dual Displays
- LED - Digital Clock, HT16K33
- LED - Draw Matrix Characters Demo
- LED - Enumerate Matrix Characters & Symbols
- LED - Matrix
- LED - Matrix Demo
- LED - Matrix HT16K33
- LED - Matrix HT16K33 16x8
Servo
- Servo
- Servo - Continuous
- Servo - Drive
- Servo - Multi-Turn
- Servo - PCA9685
- Servo - Prompt
- Servo - Slider control
- Servo - Tessel Servo Module
- Servos - An array of servos
GPS
Servo Animation
Color
Motor
- Motor
- Motor - 3 pin
- Motor - Adafruit DRV8871 DC Motor Driver Breakout
- Motor - Brake
- Motor - Current
- Motor - Directional
- Motor - EVShield EV3
- Motor - EVShield NXT
- Motor - Enable Pin
- Motor - GROVE_I2C_MOTOR_DRIVER
- Motor - H-Bridge
- Motor - LUDUS
- Motor - PCA9685
- Motor - Pololu VNH5019 Dual Motor Driver Breakout
- Motor - Sparkfun Dual H-bridge Edison Block
- Motor - Sparkfun TB6612FNG
- Motor - l298 Breakout
- Motors - Dual H-Bridge
Stepper Motor
ESC & Brushless Motor
Button / Switch
- Button
- Button - Bumper
- Button - EVShield EV3
- Button - EVShield NXT
- Button - Options
- Button - Pullup
- Buttons - Collection w/ AT42QT1070
- Switch
- Switch - Magnetic Door
- Switch - Tilt SW-200D
- Toggle Switch
Keypad
- Keypad - 3x4 I2C Nano Backpack
- Keypad - 4x4 I2C Nano Backpack
- Keypad - VKEY
- Keypad - Waveshare AD
- Touchpad - Grove QTouch
- Touchpad - MPR121
- Touchpad - MPR121, Sensitivity
- Touchpad - MPR121QR2_SHIELD
- Touchpad - MPR121_KEYPAD
- Touchpad - MPR121_SHIELD
Relay
Shift Register
- Shift Register
- Shift Register - Common Anode Seven Segment controller
- Shift Register - Common Anode Seven segments, Chained
- Shift Register - Seven Segment controller
- Shift Register - Seven segments, Chained
Infrared Reflectance
Proximity
- Proximity
- Proximity - EVShield EV3 (IR)
- Proximity - EVShield EV3 (IR)
- Proximity - EVShield EV3 (Ultrasonic)
- Proximity - EVShield EV3 (Ultrasonic)
- Proximity - GP2Y0A710K0F
- Proximity - HC-SR04
- Proximity - HC-SR04 (Analog)
- Proximity - HC-SR04 I2C Backpack
- Proximity - LIDAR-Lite
- Proximity - MB1000
- Proximity - MB1003
- Proximity - MB1010
- Proximity - MB1230
- Proximity - SRF10
Motion
Joystick
LCD
- Grove - RGB LCD Color Previewer
- LCD
- LCD - Enumerate characters
- LCD - I2C
- LCD - I2C PCF8574
- LCD - I2C Runner
- LCD - Runner 16x2
- LCD - Runner 20x4
- LCD - Tessel 2 16x2
- Tessel 2 + Grove - RGB LCD Color Previewer
- Tessel 2 + Grove - RGB LCD Display
Compass/Magnetometer
- Compass - Find north
- Compass - HMC5883L
- Compass - HMC6352
- Compass - Logger
- Compass - MAG3110
- Compass - MAG3110 on Tessel 2
- Compass / Magnetometer
Piezo
IMU/Multi
- IMU - BNO055
- IMU - BNO055 (Orientation)
- IMU - LSM303C
- IMU - MPU6050
- Multi - BME280
- Multi - BMP085
- Multi - BMP180
- Multi - DHT11_I2C_NANO_BACKPACK
- Multi - DHT21_I2C_NANO_BACKPACK
- Multi - DHT22_I2C_NANO_BACKPACK
- Multi - HIH6130
- Multi - HTU21D
- Multi - MPL115A2
- Multi - MPL3115A2
- Multi - MS5611
- Multi - SHT31D
- Multi - SI7020
- Multi - SI7021
- Multi - TH02
Sensors
- Accelerometer
- Accelerometer - ADXL335
- Accelerometer - ADXL345
- Accelerometer - LIS3DH
- Accelerometer - MMA7361
- Accelerometer - MMA8452
- Accelerometer - MPU6050
- Accelerometer - Pan + Tilt
- Altimeter - BMP085
- Altimeter - BMP180
- Altimeter - MPL3115A2
- Altimeter - MS5611
- Barometer - BMP085
- Barometer - BMP180
- Barometer - MPL115A2
- Barometer - MPL3115A2
- Barometer - MS5611
- Gyro
- Gyro - Analog LPR5150AL
- Gyro - I2C MPU6050
- Hygrometer - DHT11_I2C_NANO_BACKPACK
- Hygrometer - DHT21_I2C_NANO_BACKPACK
- Hygrometer - DHT22_I2C_NANO_BACKPACK
- Hygrometer - HIH6130
- Hygrometer - HTU21D
- Hygrometer - SHT31D
- Hygrometer - SI7021
- Hygrometer - TH02
- Sensor
- Sensor - Digital Microwave
- Sensor - Flex sensor
- Sensor - Force sensitive resistor
- Sensor - Microphone
- Sensor - Photoresistor
- Sensor - Potentiometer
- Sensor - Slide potentiometer
- Thermometer - BMP085
- Thermometer - BMP180
- Thermometer - DHT11_I2C_NANO_BACKPACK
- Thermometer - DHT21_I2C_NANO_BACKPACK
- Thermometer - DHT22_I2C_NANO_BACKPACK
- Thermometer - DS18B20
- Thermometer - Dual DS18B20
- Thermometer - HIH6130
- Thermometer - HTU21D
- Thermometer - LM335
- Thermometer - LM35
- Thermometer - MAX31850
- Thermometer - MCP9808
- Thermometer - MPL115A2
- Thermometer - MPL3115A2
- Thermometer - MPU6050
- Thermometer - MS5611
- Thermometer - SHT31D
- Thermometer - SI7020
- Thermometer - SI7021
- Thermometer - TH02
- Thermometer - TMP102
- Thermometer - TMP36
Expander
- Expander - 74HC595
- Expander - CD74HC4067, 16 Channel Analog Input Breakout
- Expander - LIS3DH
- Expander - MCP23008
- Expander - MCP23017
- Expander - MUXSHIELD2, Analog Sensors
- Expander - MUXSHIELD2, Digital Input and Output
- Expander - PCA9685
- Expander - PCF8574
- Expander - PCF8575
- Expander - PCF8591
Photon Weather Shield
Lego EVShield
- Button - EVShield EV3
- Button - EVShield NXT
- Color - EVShield EV3 (Code)
- Color - EVShield EV3 (Raw)
- Color - EVShield NXT (Code)
- Light - BH1750
- Light - EVShield EV3 (Ambient)
- Light - EVShield EV3 (Reflected)
- Light - EVShield NXT (Ambient)
- Light - EVShield NXT (Reflected)
- Light - TSL2561
- Motor - EVShield EV3
- Motor - EVShield NXT
- Proximity - EVShield EV3 (IR)
- Proximity - EVShield EV3 (Ultrasonic)
Intel Edison + Grove IoT Kit
- Intel Edison + Grove - Accelerometer (ADXL345)
- Intel Edison + Grove - Accelerometer (MMA7660)
- Intel Edison + Grove - Air quality sensor
- Intel Edison + Grove - Barometer (BMP180)
- Intel Edison + Grove - Button
- Intel Edison + Grove - Compass (HMC588L)
- Intel Edison + Grove - Flame Sensor
- Intel Edison + Grove - Gas (MQ2)
- Intel Edison + Grove - Humidity & Temperature (TH02)
- Intel Edison + Grove - I2C Motor Driver
- Intel Edison + Grove - Joystick
- Intel Edison + Grove - LED
- Intel Edison + Grove - Light Sensor (TSL2561)
- Intel Edison + Grove - Moisture Sensor
- Intel Edison + Grove - Q Touch
- Intel Edison + Grove - RGB LCD
- Intel Edison + Grove - RGB LCD Color Previewer
- Intel Edison + Grove - RGB LCD temperature display
- Intel Edison + Grove - Relay
- Intel Edison + Grove - Rotary Potentiometer
- Intel Edison + Grove - Servo
- Intel Edison + Grove - Touch
Grove IoT Kit (Seeed Studio)
- Grove - Button
- Grove - Joystick
- Grove - LED
- Grove - Motor (I2C Driver)
- Grove - RGB LCD
- Grove - RGB LCD temperature display
- Grove - Rotary Potentiometer
- Grove - Servo
- Grove - Touch
Micro Magician V2
TinkerKit
- TinkerKit - Accelerometer
- TinkerKit - Blink
- TinkerKit - Button
- TinkerKit - Combo
- TinkerKit - Continuous servo
- TinkerKit - Gyro
- TinkerKit - Joystick
- TinkerKit - Linear potentiometer
- TinkerKit - Rotary potentiometer
- TinkerKit - Temperature
- TinkerKit - Tilt
- TinkerKit - Touch
Wii
Complete Bots / Projects
- Bug
- Kinect Robotic Arm Controller
- Laser Trip Wire
- Line Follower
- Lynxmotion Biped BRAT
- Motobot
- Navigator
- Nodebot
- Phoenix Hexapod
- Radar
- Robotic Claw
- Whisker
Component Plugin Template
IO Plugins
- Led Blink on Electric Imp
- Led Blink on Intel Edison Arduino Board
- Led Blink on Intel Edison Mini Board
- Led Blink on Intel Galileo Gen 2
- Led Blink on Raspberry Pi
- Led Blink on Spark Core
- Led Blink on pcDuino3
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 (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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE-MIT:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
Found 8/25 approved changesets -- score normalized to 3
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/npm-grunt.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-grunt.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rwaldron/johnny-five/npm-grunt.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-grunt.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/rwaldron/johnny-five/npm-grunt.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/npm-grunt.yml:31
- Warn: npmCommand not pinned by hash: .github/workflows/npm-grunt.yml:32
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 13 are checked with a SAST tool
Reason
50 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-j383-35pm-c5h4
- Warn: Project is vulnerable to: GHSA-rm36-94g8-835r
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-x55w-vjjp-222r
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-38h8-x697-gh8q
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
3
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to johnny-five
serialport
Node.js package to access serial ports. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
@types/johnny-five
TypeScript definitions for johnny-five
pimatic-johnny-five
Pimatic Plugin for Johnny Five, a Robotics and IoT programming framework.
generator-johnny-five
Yeoman generator that scaffolds out a Johnny-Five project