Reader small image

You're reading from  Learning JavaScript Robotics

Product typeBook
Published inNov 2015
Reading LevelIntermediate
Publisher
ISBN-139781785883347
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Kassandra Perch
Kassandra Perch
author image
Kassandra Perch

Kassandra Perch is an open web developer and supporter. She began as a frontend developer and moved to server-side with the advent of Node.js and was especially enthralled by the advance of the NodeBots community. She travels the world speaking at conferences about NodeBots and the fantastic community around them.
Read more about Kassandra Perch

Right arrow

Why do we need the I2C and SPI protocols?


This is all starting to get really complicated, right? Why even bother? We have digital pins and analog pins; shouldn't reading values from these be enough?

Not when you go outside the realm of LEDs. Think about how much information goes into this text you're reading on a page (or, likely, a screen)! Bytes and bytes of information. This is true for many peripherals you'll use in Johnny-Five applications.

For instance, the accelerometer we'll be using—without the I2C protocol, it would use three analog pins. That's the majority of the analog pins on an Arduino Uno, and many platforms don't have analog pins at all! Not to mention the LCD we used in Chapter 4, Using Specialized Output Devices—without I2C, we have to correctly wire 11 different pins, six of which are separate data pins.

The complexity of data being sent and received is also an issue. There are sensors that send back data that doesn't fit in an analog range of 0-1024. There are output devices...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning JavaScript Robotics
Published in: Nov 2015Publisher: ISBN-13: 9781785883347

Author (1)

author image
Kassandra Perch

Kassandra Perch is an open web developer and supporter. She began as a frontend developer and moved to server-side with the advent of Node.js and was especially enthralled by the advance of the NodeBots community. She travels the world speaking at conferences about NodeBots and the fantastic community around them.
Read more about Kassandra Perch