Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Javascript Robotics

You're reading from   Learning Javascript Robotics Design, build, and program your own remarkable robots with JavaScript and open source hardware

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785883347
Length 160 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Kassandra Perch Kassandra Perch
Author Profile Icon Kassandra Perch
Kassandra Perch
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with JS Robotics 2. Working with Johnny-Five FREE CHAPTER 3. Using Digital and PWM Output Pins 4. Using Specialized Output Devices 5. Using Input Devices and Sensors 6. Moving Your Bot 7. Advanced Movement with the Animation Library 8. Advanced Components – SPI, I2C, and Other Devices 9. Connecting NodeBots to the World, and Where to Go Next Index

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image