johnny-five

所属分类:人工智能/神经网络/深度学习
开发工具:JavaScript
文件大小:65152KB
下载次数:0
上传日期:2023-03-23 13:19:10
上 传 者sh-1993
说明:  johnny five,JavaScript机器人和物联网编程框架,在博库开发。
(johnny-five,JavaScript Robotics and IoT programming framework, developed at Bocoup.)

文件列表:
.jscsrc (569, 2023-03-23)
.jshintrc (463, 2023-03-23)
.npmignore (401, 2023-03-23)
.nycrc (250, 2023-03-23)
.tesselignore (234, 2023-03-23)
CODE_OF_CONDUCT.md (2392, 2023-03-23)
CONTRIBUTING.md (6363, 2023-03-23)
CONTRIBUTORS.md (2065, 2023-03-23)
Gruntfile.js (12280, 2023-03-23)
LICENSE-MIT (1362, 2023-03-23)
appveyor.yml (324, 2023-03-23)
assets (0, 2023-03-23)
assets\Animation-Graph(1).png (13225, 2023-03-23)
assets\Animation-Graph(2).png (13192, 2023-03-23)
assets\Animation-Graph(3).png (11916, 2023-03-23)
assets\Animation-Graph(4).png (12395, 2023-03-23)
assets\Animation-Graph(5).png (12404, 2023-03-23)
assets\Animation-Graph(6).png (13576, 2023-03-23)
assets\Animation-Graph(7).png (12690, 2023-03-23)
assets\Animation-Graph(8).png (13960, 2023-03-23)
assets\Animation-Graph(9).png (14003, 2023-03-23)
assets\johnny-five.ai (1213443, 2023-03-23)
assets\johnny-five.eps (1313826, 2023-03-23)
assets\johnny-five.svg (99018, 2023-03-23)
assets\led-blink.gif (42915, 2023-03-23)
assets\rmurphey-rock-paper-scissors.jpg (128989, 2023-03-23)
assets\sgier-johnny-five.png (107274, 2023-03-23)
awesome.md (5011, 2023-03-23)
docs (0, 2023-03-23)
docs\accelerometer-LIS3DH.md (1702, 2023-03-23)
docs\accelerometer-MMA8452.md (1585, 2023-03-23)
docs\accelerometer-adxl335.md (1494, 2023-03-23)
docs\accelerometer-adxl345.md (1574, 2023-03-23)
... ...

![](https://github.com/rwaldron/johnny-five/raw/main/assets/sgier-johnny-five.png) # Johnny-Five ### The JavaScript Robotics Programming Framework _Artwork by [Mike Sgier](http://msgierillustration.com)_ [![Build, Lint, Test and Measure Coverage](https://github.com/rwaldron/johnny-five/actions/workflows/npm-grunt.yml/badge.svg)](https://github.com/rwaldron/johnny-five/actions) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/hmke71k7uemtnami/branch/main?svg=true)](https://ci.appveyor.com/project/rwaldron/johnny-five) [![Coverage Status](https://coveralls.io/repos/github/rwaldron/johnny-five/badge.svg?branch=main)](https://coveralls.io/github/rwaldron/johnny-five?branch=main) [![Install Size](https://packagephobia.now.sh/badge?p=johnny-five)](https://packagephobia.now.sh/result?p=johnny-five) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/rwaldron/johnny-five) **Johnny-Five is an Open Source, Firmata Protocol based, IoT and Robotics programming framework, developed by the [Nodebots](https://twitter.com/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](http://johnny-five.io). * If you want to find the API documentation, [that’s right here](http://johnny-five.io/api/). * Need to figure out what platform to use for a project? We put that stuff [here](http://johnny-five.io/platform-support/). * Need inspiration for your next NodeBot? Check out the [examples](http://johnny-five.io/examples/). * Want to stay up-to-date with projects in the community? [Check this out](http://johnny-five.io/articles/). * Need NodeBots community or Johnny-Five project updates and announcements? [This](http://johnny-five.io/news/) 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](http://expressjs.com/) and [Socket.io](http://socket.io/). - Fellow hardware projects like [ar-drone](https://github.com/felixge/node-ar-drone), [Aerogel](https://github.com/ceejbot/aerogel) and [Spheron](https://github.com/alchemycs/spheron) - Bluetooth game controllers like [XBox Controller](https://github.com/andrew/node-xbox-controller) and [DualShock](https://github.com/rdepena/node-dualshock-controller) - IoT frameworks, such as [Octoblu](http://www.octoblu.com/) ...And that's only a few of the many explorable possibilities. Check out these exciting projects: [node-pulsesensor](https://www.npmjs.org/package/node-pulsesensor), [footballbot-workshop-ui](https://www.npmjs.org/package/footballbot-workshop-ui), [nodebotui](https://www.npmjs.org/package/nodebotui), [dublin-disco](https://www.npmjs.org/package/dublin-disco), [node-slot-car-bot](https://www.npmjs.org/package/node-slot-car-bot), [servo-calibrator](https://www.npmjs.org/package/servo-calibrator), [node-ardx](https://www.npmjs.org/package/node-ardx), [nodebot-workshop](https://www.npmjs.org/package/nodebot-workshop), [phone-home](https://www.npmjs.org/package/phone-home), [purple-unicorn](https://www.npmjs.org/package/purple-unicorn), [webduino](https://www.npmjs.org/package/webduino), [leapduino](https://www.npmjs.org/package/leapduino), [lasercat-workshop](https://www.npmjs.org/package/lasercat-workshop), [simplesense](https://www.npmjs.org/package/simplesense), [five-redbot](https://www.npmjs.org/package/five-redbot), [robotnik](https://www.npmjs.org/package/robotnik), [the-blender](https://www.npmjs.org/package/the-blender) **Why JavaScript?** [NodeBots: The Rise of JavaScript Robotics](http://www.voodootikigod.com/nodebots-the-rise-of-js-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. ```javascript const { Board, Led } = require("johnny-five"); const board = new Board(); board.on("ready", () => { // Create an Led on pin 13 const led = new 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](https://github.com/rwaldron/johnny-five/wiki/Board). For non-Arduino based projects, a number of platform-specific [IO Plugins](https://github.com/rwaldron/johnny-five/wiki/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](http://johnny-five.io/api/) and [example programs here](http://johnny-five.io/examples/). ## Guidance Need help? Ask a question on the [NodeBots Community Forum](http://forums.nodebots.io). If you just have a quick question or are interested in ongoing design discussions, join us in the [Johnny-Five Gitter Chat](https://gitter.im/rwaldron/johnny-five). For step-by-step examples, including an electronics primer, check out [Arduino Experimenter's Guide for NodeJS](http://node-ardx.org/) by [@AnnaGerber](https://twitter.com/AnnaGerber) Here is a list of [prerequisites](https://github.com/rwaldron/johnny-five/wiki/Getting-Started#prerequisites) for Linux, OSX or Windows. Check out the [bluetooth guide](https://github.com/rwaldron/johnny-five/wiki/JY-MCU-Bluetooth-Serial-Port-Module-Notes) if you want to remotely control your robot. ## Setup and Assemble Arduino - Recommended Starting Kit: [Sparkfun Inventor's Kit](https://www.sparkfun.com/products/12001) - Download [Arduino IDE](http://arduino.cc/en/main/software) - 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: ``` bash git clone git://github.com/rwaldron/johnny-five.git && cd johnny-five npm install ``` #### npm package: Install the module with: ```bash 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](http://fritzing.org/home/) 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](http://johnny-five.io/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](https://github.com/rwaldron/johnny-five/blob/main/docs/board.md) - [Board - Cleanup in 'exit' event](https://github.com/rwaldron/johnny-five/blob/main/docs/board-cleanup.md) - [Board - Multiple in one program](https://github.com/rwaldron/johnny-five/blob/main/docs/board-multi.md) - [Board - Specify Sampling Interval](https://github.com/rwaldron/johnny-five/blob/main/docs/board-sampling-interval.md) - [Board - Specify port](https://github.com/rwaldron/johnny-five/blob/main/docs/board-with-port.md) - [Custom Data Properties](https://github.com/rwaldron/johnny-five/blob/main/docs/custom-properties.md) - [Pin](https://github.com/rwaldron/johnny-five/blob/main/docs/pin.md) - [REPL](https://github.com/rwaldron/johnny-five/blob/main/docs/repl.md) ### LED - [LED](https://github.com/rwaldron/johnny-five/blob/main/docs/led.md) - [LED - Blink](https://github.com/rwaldron/johnny-five/blob/main/docs/led-blink.md) - [LED - Demo sequence](https://github.com/rwaldron/johnny-five/blob/main/docs/led-demo-sequence.md) - [LED - Fade](https://github.com/rwaldron/johnny-five/blob/main/docs/led-fade.md) - [LED - Fade callback](https://github.com/rwaldron/johnny-five/blob/main/docs/led-fade-callback.md) - [LED - Fade with animation](https://github.com/rwaldron/johnny-five/blob/main/docs/led-fade-animation.md) - [LED - PCA9685](https://github.com/rwaldron/johnny-five/blob/main/docs/led-PCA9685.md) - [LED - Pulse](https://github.com/rwaldron/johnny-five/blob/main/docs/led-pulse.md) - [LED - Pulse with animation](https://github.com/rwaldron/johnny-five/blob/main/docs/led-pulse-animation.md) - [LED - Slider](https://github.com/rwaldron/johnny-five/blob/main/docs/led-slider.md) - [LED - Tessel Servo Module](https://github.com/rwaldron/johnny-five/blob/main/docs/led-tessel-servo-module.md) - [LEDs - An array of LEDs](https://github.com/rwaldron/johnny-five/blob/main/docs/led-array.md) - [LEDs - Controlling an array of LEDs](https://github.com/rwaldron/johnny-five/blob/main/docs/led-array-controller.md) ### LED: RGB - [LED - RGB (Common Anode)](https://github.com/rwaldron/johnny-five/blob/main/docs/led-rgb-anode.md) - [LED - RGB (Common Anode) PCA9685](https://github.com/rwaldron/johnny-five/blob/main/docs/led-rgb-anode-PCA9685.md) - [LED - RGB Intensity](https://github.com/rwaldron/johnny-five/blob/main/docs/led-rgb-intensity.md) - [LED - Rainbow](https://github.com/rwaldron/johnny-five/blob/main/docs/led-rainbow.md) - [LED - Rainbow BlinkM](https://github.com/rwaldron/johnny-five/blob/main/docs/led-rgb-BLINKM.md) ### LED: Digits & Matrix - [LED - Digital Clock](https://github.com/rwaldron/johnny-five/blob/main/docs/led-digits-clock.md) - [LED - Digital Clock, Dual Displays](https://github.com/rwaldron/johnny-five/blob/main/docs/led-digits-clock-dual.md) - [LED - Digital Clock, HT16K33](https://github.com/rwaldron/johnny-five/blob/main/docs/led-digits-clock-HT16K33.md) - [LED - Draw Matrix Characters Demo](https://github.com/rwaldron/johnny-five/blob/main/docs/led-chars-demo.md) - [LED - Enumerate Matrix Characters & Symbols](https://github.com/rwaldron/johnny-five/blob/main/docs/led-enumeratechars.md) - [LED - Matrix](https://github.com/rwaldron/johnny-five/blob/main/docs/led-matrix.md) - [LED - Matrix Demo](https://github.com/rwaldron/johnny-five/blob/main/docs/led-matrix-tutorial.md) - [LED - Matrix HT16K33](https://github.com/rwaldron/johnny-five/blob/main/docs/led-matrix-HT16K33.md) - [LED - Matrix HT16K33 16x8](https://github.com/rwaldron/johnny-five/blob/main/docs/led-matrix-HT16K33-16x8.md) ### Servo - [Servo](https://github.com/rwaldron/johnny-five/blob/main/docs/servo.md) - [Servo - Continuous](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-continuous.md) - [Servo - Drive](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-drive.md) - [Servo - Multi-Turn](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-multi-turn.md) - [Servo - PCA9685](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-PCA9685.md) - [Servo - Prompt](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-prompt.md) - [Servo - Slider control](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-slider.md) - [Servo - Tessel Servo Module](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-tessel-servo-module.md) - [Servos - An array of servos](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-array.md) ### GPS - [GPS - Adafruit Ultimate GPS Breakout](https://github.com/rwaldron/johnny-five/blob/main/docs/gps-adafruit.md) - [GPS - Default GPS](https://github.com/rwaldron/johnny-five/blob/main/docs/gps.md) - [GPS - Hardware Serial](https://github.com/rwaldron/johnny-five/blob/main/docs/gps-hardware-serial.md) - [GPS - Sparkfun GP-20U7](https://github.com/rwaldron/johnny-five/blob/main/docs/gps-GP-20U7.md) ### Servo Animation - [Servo - Animation](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-animation.md) - [Servo - Leg Animation](https://github.com/rwaldron/johnny-five/blob/main/docs/servo-animation-leg.md) ### Color - [Color - EVShield EV3 (Code)](https://github.com/rwaldron/johnny-five/blob/main/docs/color-EVS_EV3.md) - [Color - EVShield EV3 (Raw)](https://github.com/rwaldron/johnny-five/blob/main/docs/color-raw-EVS_EV3.md) - [Color - EVShield NXT (Code)](https://github.com/rwaldron/johnny-five/blob/main/docs/color-EVS_NXT.md) - [Color - ISL29125](https://github.com/rwaldron/johnny-five/blob/main/docs/color-ISL29125.md) ### Motor - [Motor](https://github.com/rwaldron/johnny-five/blob/main/docs/motor.md) - [Motor - 3 pin](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-3-pin.md) - [Motor - Adafruit DRV8871 DC Motor Driver Breakout](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-drv8871.md) - [Motor - Brake](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-brake.md) - [Motor - Current](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-current.md) - [Motor - Directional](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-directional.md) - [Motor - EVShield EV3](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-EVS_EV3.md) - [Motor - EVShield NXT](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-EVS_NXT.md) - [Motor - Enable Pin](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-enable.md) - [Motor - GROVE_I2C_MOTOR_DRIVER](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-GROVE_I2C.md) - [Motor - H-Bridge](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-hbridge.md) - [Motor - LUDUS](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-LUDUS.md) - [Motor - PCA9685](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-PCA9685.md) - [Motor - Pololu VNH5019 Dual Motor Driver Breakout](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-vnh5019.md) - [Motor - Sparkfun Dual H-bridge Edison Block](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-sparkfun-edison-hbridge.md) - [Motor - Sparkfun TB6612FNG](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-TB6612FNG.md) - [Motor - l2*** Breakout](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-l2***-breakout.md) - [Motors - Dual H-Bridge](https://github.com/rwaldron/johnny-five/blob/main/docs/motor-hbridge-dual.md) ### Stepper Motor - [Stepper - Driver](https://github.com/rwaldron/johnny-five/blob/main/docs/stepper-driver.md) - [Stepper - Four Wire](https://github.com/rwaldron/johnny-five/blob/main/docs/stepper-four_wire.md) - [Stepper - Sweep](https://github.com/rwaldron/johnny-five/blob/main/docs/stepper-sweep.md) ### ESC & Brushless Motor - [ESC - Bidirectional](https://github.com/rwaldron/johnny-five/blob/main/docs/esc-bidirectional.md) - [ESC - Keypress controlled ESCs](https://github.com/rwaldron/johnny-five/blob/main/docs/esc-keypress.md) - [ESC - PCA9685](https://github.com/rwaldron/johnny-five/blob/main/docs/esc-PCA9685.md) ### Button / Switch - [Button](https://github.com/rwaldron/johnny-five/blob/main/docs/button.md) - [Button - Bumper](https://github.com/rwaldron/johnny-five/blob/main/docs/button-bumper.md) - [Button - EVShield EV3](https://github.com/rwaldron/johnny-five/blob/main/docs/button-EVS_EV3.md) - [Button - EVShield NXT](https://github.com/rwaldron/johnny-five/blob/main/docs/button-EVS_NXT.md) - [Button - Options](https://github.com/rwaldron/johnny-five/blob/main/docs/button-options.md) - [Button - Pullup](https://github.com/rwaldron/johnny-five/blob/main/docs/button-pullup.md) - [Buttons - Collection w/ AT42QT1070](https://github.com/rwaldron/johnny-five/blob/main/docs/button-collection-AT42QT1070.md) - [Switch](https://github.com/rwaldron/johnny-five/blob/main/docs/switch.md) - [Switch - Magnetic Door](https://github.com/rwaldron/johnny-five/blob/main/docs/switch-magnetic-door.md) - [Switch - Tilt SW-200D](https://github.com/rwaldron/johnny-five/blob/main/docs/switch-tilt-SW_200D.md) - [Toggle Switch](https://github.com/rwaldron/johnny-five/blob/main/docs/toggle-switch.md) ### Keypad - [Keypad - 3x4 I2C Nano Backpack](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-3X4_I2C_NANO_BACKPACK.md) - [Keypad - 4x4 I2C Nano Backpack](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-4X4_I2C_NANO_BACKPACK.md) - [Keypad - VKEY](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-analog-vkey.md) - [Keypad - Waveshare AD](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-analog-ad.md) - [Touchpad - Grove QTouch](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-QTOUCH.md) - [Touchpad - MPR121](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-MPR121.md) - [Touchpad - MPR121, Sensitivity](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-MPR121-sensitivity.md) - [Touchpad - MPR121QR2_SHIELD](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-MPR121QR2_SHIELD.md) - [Touchpad - MPR121_KEYPAD](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-MPR121_KEYPAD.md) - [Touchpad - MPR121_SHIELD](https://github.com/rwaldron/johnny-five/blob/main/docs/keypad-MPR121_SHIELD.md) ### Relay - [Relay](https://github.com/rwaldron/johnny-five/blob/main/docs/relay.md) - [Relay - Collection](https://github.com/rwaldron/johnny-five/blob/main/docs/relay-collection.md) - [Relay On Analog Pin](https://github.com/rwaldron/johnny-five/blob/main/docs/relay-on-analog-pin.md) ### Shift Register - [Shift Register](https://github.com/rwaldron/johnny-five/blob/main/docs/shift-register.md) - [Shift Register - Common Anode Seven Segment controller](https://github.com/rwaldron/johnny-five/blob/main/docs/shift-register-seven-segment-anode.md) - [Shift Register - Common Anode Seven segments, Chained](https://github.com/rwaldron/johnny-five/blob/main/docs/shift-register-daisy-chain-anode.md) - [Shift Register - Seven Segment controller](https://github.com/rwaldron/johnny-five/blob/main/docs/shift-register-seven-segment.md) - [Shift Register - Seven segments, Chained](https://gi ... ...

近期下载者

相关文件


收藏者