Chapter 7. Sense and Display Real-World Data

In this chapter, we will cover the following topics:

  • Using devices with the I2C bus
  • Reading analog data using an analog-to-digital converter
  • Logging and plotting data
  • Extending the Raspberry Pi GPIO with an I/O expander
  • Capturing data in an SQLite database
  • Viewing data from your own webserver
  • Sensing and sending data to online services

Introduction

In the previous chapter, we made use of the Raspberry Pi GPIO to directly control and respond to the attached hardware by controlling or reading the GPIO pins. In this chapter, we will learn how to collect analog data from the real world and process it so we can display, log, graph, and share the data and make use of it in our programs.

We will extend the capabilities ...

Get Raspberry Pi for Python Programmers Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.