Skip to content

angels2it/jsot-johnny-five

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Johnny-Five Basic Examples with Arduino Uno

Install: Prepare Uno as Client

PreRequisites

Download and install the Arduino IDE (free; Mac, Windows, Linux).

Clone this repository.

Firmata Firmware

  1. Open Arduino IDE
  2. Connect the Uno with USB
  3. In the File -> Examples menu, find the Firmata submenu and select StandardFirmata
  4. Upload the StandardFirmata sketch to the Arduino

Johnny-Five and Example Dependencies

cd <directory with this repo>
npm install

Examples

Hello, World

Hello, World and Modified Hello World don't require any wiring except plugging Arduino into USB on your computer.

node examples/01-hello.js
node examples/02-hello-stop.js

RGB LED

RGB display of website colors is based on the following schematic:

node examples/03-rgb.js

Note: I've removed the dependency this script has on website-color-extractor from package.json because of dependency issues caused by the great npm debacle of March, 2016. See more detailed note in source script.

A bonus basic RGB LED script can be found in examples/03-rgb-dance.js.

Analog Sensors

The following schematic is for:

The proximity example uses a GP2Y0A41SK0F infrared proximity sensor.

node examples/04-photoresistor.js
node examples/05-proximity.js

Serial Data

To run the compass-north alarm example, you'll need the following setup:

The example uses the Sparkfun HMC5883L triple-access breakout.

node examples/06-compass.js

About

Hardware Hacking with Johnny-Five and Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published