diff --git a/eg/altimeter-mpl3115a2.js b/eg/altimeter-mpl3115a2.js index a429c12ae..517504bfb 100644 --- a/eg/altimeter-mpl3115a2.js +++ b/eg/altimeter-mpl3115a2.js @@ -21,7 +21,7 @@ board.on("ready", () => { /* @markdown -- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Temperature Sensor](https://www.adafruit.com/products/1893) +- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Thermometer Sensor](https://www.adafruit.com/products/1893) - [SparkFun Altitude/Pressure Sensor Breakout - MPL3115A2](https://www.sparkfun.com/products/11084) - [SparkFun Weather Shield](https://www.sparkfun.com/products/12081) - [SparkFun Photon Weather Shield](https://www.sparkfun.com/products/13630) diff --git a/eg/barometer-mpl3115a2.js b/eg/barometer-mpl3115a2.js index 49cc08111..7d980424d 100644 --- a/eg/barometer-mpl3115a2.js +++ b/eg/barometer-mpl3115a2.js @@ -14,7 +14,7 @@ board.on("ready", () => { }); /* @markdown -- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Temperature Sensor](https://www.adafruit.com/products/1893) +- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Thermometer Sensor](https://www.adafruit.com/products/1893) - [SparkFun Altitude/Pressure Sensor Breakout - MPL3115A2](https://www.sparkfun.com/products/11084) - [SparkFun Weather Shield](https://www.sparkfun.com/products/12081) - [SparkFun Photon Weather Shield](https://www.sparkfun.com/products/13630) diff --git a/eg/board-collection.js b/eg/board-collection.js new file mode 100644 index 000000000..a70438252 --- /dev/null +++ b/eg/board-collection.js @@ -0,0 +1,11 @@ +const { Boards, Led } = require("../lib/johnny-five.js"); +const boards = new Boards([ + "/dev/tty.usbmodem14101", + "/dev/tty.wchusbserial1420", +]); + +const pin = 13; + +boards.on("ready", () => { + boards.each(board => new Led({board, pin}).blink()); +}); diff --git a/eg/grove-humidity-temperature-edison.js b/eg/grove-humidity-temperature-edison.js index 4deb76a82..c4aea23d7 100644 --- a/eg/grove-humidity-temperature-edison.js +++ b/eg/grove-humidity-temperature-edison.js @@ -31,8 +31,8 @@ For this program, you'll need: ![Grove Base Shield v2](http://www.seeedstudio.com/depot/images/product/base%20shield%20V2_01.jpg) -![Grove - Temperature&Humidity Sensor (High-Accuracy & Mini)](https://github.com/rwaldron/johnny-five/raw/master/docs/breadboard/multi-TH02.png) +![Grove - Thermometer&Humidity Sensor (High-Accuracy & Mini)](https://github.com/rwaldron/johnny-five/raw/master/docs/breadboard/multi-TH02.png) -- [Grove - Temperature&Humidity Sensor (High-Accuracy & Mini)](http://www.seeedstudio.com/depot/Grove-TemperatureHumidity-Sensor-HighAccuracy-Mini-p-1921.html) +- [Grove - Thermometer&Humidity Sensor (High-Accuracy & Mini)](http://www.seeedstudio.com/depot/Grove-ThermometerHumidity-Sensor-HighAccuracy-Mini-p-1921.html) @markdown */ diff --git a/eg/grove-lcd-rgb-temperature-display-edison.js b/eg/grove-lcd-rgb-temperature-display-edison.js index 64798786a..71ae6edce 100644 --- a/eg/grove-lcd-rgb-temperature-display-edison.js +++ b/eg/grove-lcd-rgb-temperature-display-edison.js @@ -6,7 +6,7 @@ var board = new five.Board({ board.on("ready", function() { - // Plug the Temperature sensor module + // Plug the Thermometer sensor module // into the Grove Shield's A0 jack var thermometer = new five.Thermometer({ controller: "GROVE", @@ -63,7 +63,7 @@ For this program, you'll need: ![Grove - LCD RGB w/ Backlight](http://www.seeedstudio.com/wiki/images/0/03/Serial_LEC_RGB_Backlight_Lcd.jpg) -![Grove - Temperature Sensor](http://www.seeedstudio.com/wiki/images/thumb/b/b0/Temperature1.jpg/400px-Temperature1.jpg) +![Grove - Thermometer Sensor](http://www.seeedstudio.com/wiki/images/thumb/b/b0/Thermometer1.jpg/400px-Thermometer1.jpg) @markdown */ diff --git a/eg/grove-lcd-rgb-temperature-display.js b/eg/grove-lcd-rgb-temperature-display.js index be63e9693..d8d5dd6fa 100644 --- a/eg/grove-lcd-rgb-temperature-display.js +++ b/eg/grove-lcd-rgb-temperature-display.js @@ -3,7 +3,7 @@ var board = new five.Board(); board.on("ready", function() { - // Plug the Temperature sensor module + // Plug the Thermometer sensor module // into the Grove Shield's A0 jack var thermometer = new five.Thermometer({ controller: "GROVE", @@ -62,7 +62,7 @@ For this program, you'll need: ![Grove - LCD RGB w/ Backlight](http://www.seeedstudio.com/wiki/images/0/03/Serial_LEC_RGB_Backlight_Lcd.jpg) -![Grove - Temperature Sensor](http://www.seeedstudio.com/wiki/images/thumb/b/b0/Temperature1.jpg/400px-Temperature1.jpg) +![Grove - Thermometer Sensor](http://www.seeedstudio.com/wiki/images/thumb/b/b0/Thermometer1.jpg/400px-Thermometer1.jpg) @markdown */ diff --git a/eg/multi-mpl3115a2.js b/eg/multi-mpl3115a2.js index d93ba55cf..67406d3b9 100644 --- a/eg/multi-mpl3115a2.js +++ b/eg/multi-mpl3115a2.js @@ -29,7 +29,7 @@ board.on("ready", function() { }); /* @markdown -- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Temperature Sensor](https://www.adafruit.com/products/1893) +- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Thermometer Sensor](https://www.adafruit.com/products/1893) - [SparkFun Altitude/Pressure Sensor Breakout - MPL3115A2](https://www.sparkfun.com/products/11084) - [SparkFun Weather Shield](https://www.sparkfun.com/products/12081) - [SparkFun Photon Weather Shield](https://www.sparkfun.com/products/13630) diff --git a/eg/servo.collection-animation-PCA9685.js b/eg/servo.collection-animation-PCA9685.js new file mode 100644 index 000000000..d6f600ec1 --- /dev/null +++ b/eg/servo.collection-animation-PCA9685.js @@ -0,0 +1,30 @@ +const {Animation, Board, Servos} = require("../"); +const board = new Board(); +const controller = "PCA9685"; + +board.on("ready", function() { + const servos = new Servos([ + { controller, pin: 0 }, + { controller, pin: 1 }, + { controller, pin: 2 }, + { controller, pin: 3 }, + { controller, pin: 4 }, + { controller, pin: 5 }, + ]); + + const animation = new Animation(servos); + + // Create an animation segment object + animation.enqueue({ + duration: 2000, + cuePoints: [0, 0.5, 1.0], + keyFrames: [ + [{degrees: 0}, {degrees: 180}, {degrees: 150}], + [{degrees: 0}, {degrees: 180}, {degrees: 120}], + [{degrees: 0}, {degrees: 180}, {degrees: 90}], + [{degrees: 0}, {degrees: 180}, {degrees: 60}], + [{degrees: 0}, {degrees: 180}, {degrees: 30}], + [{degrees: 0}, {degrees: 180}, {degrees: 0}], + ] + }); +}); diff --git a/eg/temperature-ds18b20.js b/eg/temperature-ds18b20.js index 5dfebff54..e3b0bab9f 100644 --- a/eg/temperature-ds18b20.js +++ b/eg/temperature-ds18b20.js @@ -19,5 +19,5 @@ board.on("ready", () => { }); /* @markdown -- [DS18B20 - Temperature Sensor](http://www.maximintegrated.com/en/products/analog/sensors-and-sensor-interface/DS18S20.html) +- [DS18B20 - Thermometer Sensor](http://www.maximintegrated.com/en/products/analog/sensors-and-sensor-interface/DS18S20.html) @markdown */ diff --git a/eg/temperature-dual-ds18b20.js b/eg/temperature-dual-ds18b20.js index 44b82660b..c97582a37 100644 --- a/eg/temperature-dual-ds18b20.js +++ b/eg/temperature-dual-ds18b20.js @@ -37,5 +37,5 @@ board.on("ready", () => { }); /* @markdown -// - [DS18B20 - Temperature Sensor](http://www.maximintegrated.com/en/products/analog/sensors-and-sensor-interface/DS18S20.html) +// - [DS18B20 - Thermometer Sensor](http://www.maximintegrated.com/en/products/analog/sensors-and-sensor-interface/DS18S20.html) @markdown */ diff --git a/eg/temperature-lm335.js b/eg/temperature-lm335.js index d00f86fb4..3152f34d3 100644 --- a/eg/temperature-lm335.js +++ b/eg/temperature-lm335.js @@ -18,5 +18,5 @@ board.on("ready", () => { }); /* @markdown -- [LM335 - Temperature Sensor](http://www.ti.com/product/lm335) +- [LM335 - Thermometer Sensor](http://www.ti.com/product/lm335) @markdown */ diff --git a/eg/temperature-lm35.js b/eg/temperature-lm35.js index b57532cce..fdc1c5859 100644 --- a/eg/temperature-lm35.js +++ b/eg/temperature-lm35.js @@ -18,5 +18,5 @@ board.on("ready", () => { }); /* @markdown -- [LM35 - Temperature Sensor](http://www.ti.com/product/lm35) +- [LM35 - Thermometer Sensor](http://www.ti.com/product/lm35) @markdown */ diff --git a/eg/temperature-mpl115a2.js b/eg/temperature-mpl115a2.js index 67d8c919e..fb55065a7 100644 --- a/eg/temperature-mpl115a2.js +++ b/eg/temperature-mpl115a2.js @@ -18,5 +18,5 @@ board.on("ready", () => { /* @markdown -- [MPL115A2 - I2C Barometric Pressure/Temperature Sensor](https://www.adafruit.com/product/992) +- [MPL115A2 - I2C Barometric Pressure/Thermometer Sensor](https://www.adafruit.com/product/992) @markdown */ diff --git a/eg/temperature-mpl3115a2.js b/eg/temperature-mpl3115a2.js index c6d63f35d..4eda9c7f9 100644 --- a/eg/temperature-mpl3115a2.js +++ b/eg/temperature-mpl3115a2.js @@ -17,7 +17,7 @@ board.on("ready", () => { }); /* @markdown -- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Temperature Sensor](https://www.adafruit.com/products/1893) +- [MPL3115A2 - I2C Barometric Pressure/Altimiter/Thermometer Sensor](https://www.adafruit.com/products/1893) - [SparkFun Altitude/Pressure Sensor Breakout - MPL3115A2](https://www.sparkfun.com/products/11084) - [SparkFun Weather Shield](https://www.sparkfun.com/products/12081) - [SparkFun Photon Weather Shield](https://www.sparkfun.com/products/13630) diff --git a/eg/temperature-mpu6050.js b/eg/temperature-mpu6050.js index 8c3876139..c1a5d9ae9 100644 --- a/eg/temperature-mpu6050.js +++ b/eg/temperature-mpu6050.js @@ -17,5 +17,5 @@ board.on("ready", () => { }); /* @markdown -- [MPU6050 - IMU with Temperature Sensor](http://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/) +- [MPU6050 - IMU with Thermometer Sensor](http://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/) @markdown */ diff --git a/eg/temperature-tmp102.js b/eg/temperature-tmp102.js index fdcbe8eed..093783022 100644 --- a/eg/temperature-tmp102.js +++ b/eg/temperature-tmp102.js @@ -17,5 +17,5 @@ board.on("ready", () => { }); /* @markdown -- [TMP102 - Temperature Sensor](https://www.sparkfun.com/products/11931) +- [TMP102 - Thermometer Sensor](https://www.sparkfun.com/products/11931) @markdown */ diff --git a/eg/temperature-tmp36.js b/eg/temperature-tmp36.js index 923980e09..5bc643a68 100644 --- a/eg/temperature-tmp36.js +++ b/eg/temperature-tmp36.js @@ -18,5 +18,5 @@ board.on("ready", () => { }); /* @markdown -- [TMP36 - Temperature Sensor](https://www.sparkfun.com/products/10988) +- [TMP36 - Thermometer Sensor](https://www.sparkfun.com/products/10988) @markdown */