Skip to Content
Exploring Arduino, 2nd Edition
book

Exploring Arduino, 2nd Edition

by Jeremy Blum
November 2019
Beginner
512 pages
11h 50m
English
Wiley
Content preview from Exploring Arduino, 2nd Edition

11The SPI Bus and Third-Party Libraries

Parts You'll Need for This Chapter

  • Arduino Uno or Adafruit METRO 328
  • USB cable (Type A to B for Uno, Type A to Micro-B for METRO)
  • Half-size or full-size breadboard
  • Assorted jumper wires
  • 220Ω resistors (×4)
  • 5mm common-anode RGB LED
  • Piezo buzzer
  • Adafruit LIS3DH breakout board

You've already learned about two important digital communication methods that are available to you on the Arduino: the I2C bus and the serial UART bus. In this chapter, you will learn about a third digital communication method supported by the Arduino hardware: the Serial Peripheral Interface bus, or SPI (often pronounced “spy”) bus for short.

Unlike the I2C bus, the SPI bus uses separate lines for sending and receiving data, and it employs an additional line for selecting which slave device you are talking to. This adds extra wires, but also eliminates the problem of needing different slave device addresses. The SPI bus is generally easier to get running than I2C and can run at a faster speed. In this chapter, you will learn about using the Arduino's built-in SPI hardware to communicate with a digital accelerometer. You will learn how to find and install third-party libraries that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Electronics for Inventors, Fourth Edition, 4th Edition

Practical Electronics for Inventors, Fourth Edition, 4th Edition

Paul Scherz, Simon Monk

Publisher Resources

ISBN: 9781119405375Purchase book