Index
A
- accelerometer
- building, with I2C devices / Building with an I2C device – Accelerometer
- wiring up / Wiring up our accelerometer
- example, coding / Coding up our example
- Adafruit
- analog input pins
- working / How analog input pins work
- animation
- need for / Why animation?
- Animation API
- about / What is the Animation API?
- need for / Why do we need an Animation API?
- animation / Why animation?
- observing / Looking at the Animation API
- terminology / Learning the terminology
- target / Learning the terminology
- segment / Learning the terminology
- keyframe / Learning the terminology
- cue points / Learning the terminology
- duration / Learning the terminology
- and .to() method, differentiating between / The difference between .to() and the Animation API
- ServoArray object / Using the ServoArray object
- three servos, wiring / Project – wiring up three servos and creating an array
- array, creating / Project – wiring up three servos and creating an array
- animation events
- about / Animation events
- onstart callback / Animation events
- onstop callback / Animation events
- onpause callback / Animation events
- oncomplete callback / Animation events
- onloop callback / Animation events
- servo array, building with informative LCD readout / Building a servo array with an informative LCD readout
- Animation object
- about / The Animation object
- functions / The Animation object
- .enqueue() function / The Animation object
- .play() function / The Animation object
- pause() function / The Animation object
- .stop() function / The Animation object
- .next() function / The Animation object
- .speed([speed]) function / The Animation object
- Arduino
- Arduino Uno
- Arduino Uno board
- using / What we'll be using in this book
- AVRGirl
B
- barcli
- URL / barcli
- basic inputs
- using / Using basic inputs – buttons and potentiometers
- buttons / Using basic inputs – buttons and potentiometers
- potentiometers / Using basic inputs – buttons and potentiometers
- button-led.js, coding / Coding button-led.js
- benefits
- of SPI device / Benefits and drawbacks of SPI
- of I2C device / Benefits
- button
- and LED, wiring / Wiring up our button and LED
- button-led.js
- coding / Coding button-led.js
C
- character LCD
- connecting, to Arduino Uno board / Project – character LCD display
- i2c LCDs, wiring / Wiring up – I2C LCDs
- code, writing / The code
- code, i2c version / The I2C version
- code, non-i2c version / The non-I2C version
- code, running / Running the code
- character LCD without i2c interface
- example, URL / What you'll need for this chapter
- Chip Select (CS) / How SPI works
- Cylon.js
D
- development environment, for JavaScript robotics
- setting up / Setting up your development environment
- Node.js, installing / Installing Node.JS
- project, setting up / Setting up your project and installing Johnny-Five
- Johnny-Five, installing / Setting up your project and installing Johnny-Five
- Microcontroller, connecting / Connecting your Microcontroller and installing Firmata
- Firmata, installing / Connecting your Microcontroller and installing Firmata
- digital output pins
- and PWM pins, differentiating between / How to tell the difference between Digital and PWM pins
- documentation
- Donovan Buck’s tharp project / The keyframe object
- drawbacks
- of SPI device / Benefits and drawbacks of SPI
- of I2C device / Drawbacks
- drawing functions, LED matrix
- .row([index], row, value); / The Drawing functions
- .column([index], col, value); / The Drawing functions
- .draw([index], character); / The Drawing functions
E
- Espruino
- events, Johnny-Five program
- about / Understanding events in Johnny-Five
- importance / Why events?
- external devices
- about / External Devices
- importance / Why External Devices?
- node-serialport library / node-serialport
- node-hid library / node-hid
- USB gamepad, building / Building a USB gamepad
- external LED
- wiring / Wiring up an external LED
- importance / Wiring up an external LED
- hardware, setting up / Setting up the hardware
F
- Firmata
- functions, Johnny-Five program / Objects, functions, and events
G
- GitHub
- GPIO pins
- working / How GPIO pins work
- digital output pins / Digital output pins
- PWM output pins / PWM output pins
H
- Hello, World!
- onboard LED, blinking / Hello, World! – Blinking an onboard LED
- Human Interface Device (HID) devices / node-hid
I
- I2C devices
- exploring / Exploring I2C devices
- working / How I2C works
- pins / Pins used by I2C
- data, sending / How I2C devices send and receive data
- data, receiving / How I2C devices send and receive data
- drawbacks / Benefits and drawbacks of I2C, Benefits, Drawbacks
- benefits / Benefits
- used, for building accelerometer / Building with an I2C device – Accelerometer
- I2C interface
- I2C protocol
- need for / Why do we need the I2C and SPI protocols?
- inject method / Making components available to the REPL
- Inter-Integrated Circuits (i2c)
- about / Inter-Integrated Circuits (I2C)
- Inverse Kinematic (IK) / The keyframe object
J
- JavaScript robotics
- about / Understanding JS Robotics, NodeBots, and Johnny-Five
- development environment / Setting up your development environment
- JerryScript
- about / JerryScript
- URL / JerryScript
- Johnny-Five
- about / Understanding JS Robotics, NodeBots, and Johnny-Five, Johnny-Five and the NodeBot revolution
- URL / Johnny-Five and the NodeBot revolution, Running the script, Checking compatibility with Johnny-Five, Obtaining documentation, wiring diagrams, and so on, What you'll need for this chapter, Servo and motor controllers, Motor and servo shields
- and NodeBot / Johnny-Five and the NodeBot revolution
- installing / Setting up your project and installing Johnny-Five
- requisites / What you'll need for this chapter
- abstraction / Multiple pins with several LEDs
- Led objects, exploring / Exploring more about LED objects in Johnny-Five
- compatibility, checking with / Checking compatibility with Johnny-Five
- documentation, URL / What you'll need for this chapter
- sensor events / Johnny-Five sensor events
- SPI device, using / How Johnny-Five does SPI
- microcontrollers / Johnny-Five and the wide world of microcontrollers
- tethering / Tethering and Johnny-Five
- Johnny-Five program
- working / How a Johnny-Five program works
- objects / Objects, functions, and events
- events / Objects, functions, and events, Understanding events in Johnny-Five
- functions / Objects, functions, and events
- blink-LED script / Going over our blink-LED script
- JS libraries and platforms
- about / Other JS libraries and platforms
- Espruino / Espruino
- Tessel / Tessel
- Cylon.js / Cylon.js
- JerryScript / JerryScript
- tiny Linux computers / Tiny Linux computers
- vendor libraries / Vendor libraries
K
- key frames, servo animations
- writing / Writing keyframes, The keyframe object
- degrees / The keyframe object
- step / The keyframe object
- easing / The keyframe object
- copyDegrees / The keyframe object
- copyFrame / The keyframe object
- position / The keyframe object
- shorthand / Keyframe shorthand
- non-integer values / Keyframe shorthand
- writing, examples / Examples of writing keyframes
L
- LED
- and button, wiring / Wiring up our button and LED
- and potentiometer, wiring / Wiring the potentiometer and the LED, Coding our dimmer switch
- Led.RGB class / Obtaining documentation, wiring diagrams, and so on
- LED matrix
- LED matrix API
- about / The API
- data, formatting / Formatting data for the LED matrix
- drawing functions / The Drawing functions
- code / The Code
- Led object API / Multiple pins with several LEDs
M
- Master In Slave Out (MISO) / How SPI works
- Master Out Slave In (MOSI) / How SPI works
- methods, project
- on() / Multiple pins with several LEDs
- off() / Multiple pins with several LEDs
- blink(time) / Multiple pins with several LEDs
- pulse(time) / Multiple pins with several LEDs
- fade(brightness, ms) / Multiple pins with several LEDs
- stop() / Multiple pins with several LEDs
- microcontroller
- motors
- types / The different kinds of servos and motors, Types of motors
- defining / Defining motors and servos
- considerations / Things to keep in mind
- selecting / Do I use a servo or a motor?
- controllers / Servo and motor controllers
- shields / Motor and servo shields
- using, concerns / Special concerns when using motors and servos
- power concerns / Power concerns
- tethering / Tethering and cables
- cables / Tethering and cables
- wiring up / Wiring up servos and motors, Wiring up motors
- used, for creating project / Creating a project with a motor and using the REPL
- REPL, using / Creating a project with a motor and using the REPL
- motor API, exploring / Exploring the motor API
N
- node-serialport / Understanding JS Robotics, NodeBots, and Johnny-Five
- Node.js
- URL / Installing Node.JS
- NodeBot
- NodeBots
- connecting, to Web / Connecting NodeBots to the Web
- Node Server / It's just a Node Server!
- Twilio, using / Using Twilio
- WeatherBot, building / Building the WeatherBot
- TextBot, using / Using the TextBot
- used, for fixing issues / Where to go from here
- Node Package Manager (NPM) / Installing Node.JS
- non-integer values
- null / Keyframe shorthand
- false / Keyframe shorthand
O
- objects, Johnny-Five program / Objects, functions, and events
- onboard LED
- blinking / Hello, World! – Blinking an onboard LED
- Johnny-Five script, writing / Writing the Johnny-Five script
- Johnny-Five script, running / Running the script
- outputs devices
- multiple pins, requiring / Outputs that require multiple pins
P
- Particle Photon
- URL / What you'll need for this chapter
- WeatherBot, moving to / Moving our WeatherBot to the Particle Photon
- photocell
- about / Using sensors – Light and Temperature
- wiring / Wiring up our photocell
- example, coding / Coding our photocell example
- barcli / barcli
- summarizing / Coding everything together
- piezo.off() method / Exploring the Piezo API
- Piezo element
- PWM pins, using with / Using PWM pins with the Piezo element
- potentiometer
- and LED, wiring / Wiring the potentiometer and the LED, Coding our dimmer switch
- prerequisites / What you'll need for this chapter, What you'll need for this chapter
- about / What you'll need for this chapter, What you'll need for this chapter, What you'll need for this chapter
- button / What you'll need for this chapter
- rotating potentiometer / What you'll need for this chapter
- light sensor / What you'll need for this chapter
- temperature sensor / What you'll need for this chapter
- LM35 / What you'll need for this chapter
- microcontroller / What you'll need for this chapter
- for creating complex movements / What you'll need for this chapter
- Particle Photon / What you'll need for this chapter
- project
- methods / Multiple pins with several LEDs
- hardware, setting up / Setting up the hardware for the project
- script, writing / Writing the script for the project
- Led objects, in Johnny-Five / Exploring more about LED objects in Johnny-Five
- creating, with servo and sensor / Creating a project with a servo and a sensor
- pulse() method / Digital output pins
- PWM pins
- about / PWM output pins
- and digital output pins, differentiating between / How to tell the difference between Digital and PWM pins
- using, with Piezo element / Using PWM pins with the Piezo element
- PWM pins, using with Piezo element
- about / Using PWM pins with the Piezo element
- hardware, setting up / Setting up the hardware
- script, writing / Writing the script
- working / What's going on with the pin?
- Piezo API, exploring / Exploring the Piezo API
R
- REPL
- about / Using the Read-Eval-Print-Loop (REPL)
- components, making available / Making components available to the REPL
- using / Using the REPL
- using, with motor / Creating a project with a motor and using the REPL
- using, with sensor / Exploring the servo API with the REPL
S
- SainSmart / What we'll be using in this book
- segment options, servo animations
- target / Segment options
- easing / Segment options
- loop / Segment options
- metronomic / Segment options
- progress / Segment options
- currentSpeed / Segment options
- fps / Segment options
- multiple servos, in one segment / Multiple servos in one segment
- segments, servo animations
- writing / Writing segments
- options / Segment options
- writing, examples / Examples of writing segments
- sensor events, Johnny-Five / Johnny-Five sensor events
- Serial Clock Line (SCL) / Inter-Integrated Circuits (I2C)
- Serial Data Line (SDA) / Inter-Integrated Circuits (I2C)
- servo animations
- writing / Writing Servo Animations
- key frames, writing / Writing keyframes, The keyframe object
- segments, writing / Writing segments
- animation object / The Animation object
- servo array, animating / Project – animating our servo array
- servo array
- building, with informative LCD readout / Building a servo array with an informative LCD readout
- servos
- about / The different kinds of servos and motors
- defining / Defining motors and servos
- considerations / Things to keep in mind
- types / Types of servos
- selecting / Do I use a servo or a motor?
- controllers / Servo and motor controllers
- shields / Motor and servo shields
- using, concerns / Special concerns when using motors and servos
- power concerns / Power concerns
- tethering / Tethering and cables
- cables / Tethering and cables
- wiring up / Wiring up servos
- and sensor, used for creating project / Creating a project with a servo and a sensor
- servo API, exploring with sensor / Exploring the servo API with the REPL
- Slave Select (SS) / How SPI works
- SparkFun
- URL / Power concerns
- Sparkfun
- SPI device
- exploring / Exploring SPI (Serial Peripheral Interface) devices
- working / How SPI works
- features / How SPI works
- used, by Johnny-Five / How Johnny-Five does SPI
- benefits / Benefits and drawbacks of SPI
- drawbacks / Benefits and drawbacks of SPI
- used, for building LED matrix / Building with an SPI device – an LED matrix
- SPI protocol
- need for / Why do we need the I2C and SPI protocols?
T
- .to() method
- and Animation API, differentiating between / The difference between .to() and the Animation API
- temperature sensor
- using / Using sensors – Light and Temperature
- wiring / Wiring up the temperature sensor
- example, coding / Coding our temperature example
- Tessel
- about / Tessel
- Tessel 2 / Tessel
- TextBot
- using / Using the TextBot
- this.repl.inject() function / Making components available to the REPL
- Twilio
- URL / Using Twilio
- using / Using Twilio
U
- USB gamepad
- building / Building a USB gamepad
- hardware / The hardware
- node-gamepad API / The node-gamepad API
- code, adding to controller.js file / The code
V
- VoodooSpark
W
- WeatherBot
- building / Building the WeatherBot
- moving, to Particle Photon / Moving our WeatherBot to the Particle Photon
- Web
- NodeBots, connecting to / Connecting NodeBots to the Web
- wiring diagrams