© James R. Strickland 2018
James R. StricklandRaspberry Pi for Arduino Usershttps://doi.org/10.1007/978-1-4842-3414-3_6

6. Input and Output

James R. Strickland1 
(1)
Highlands Ranch, Colorado, USA
 

As pretty as the Larson (Memorial) Scanner is, it’s also a good demonstration of the Raspberry Pi’s GPIO controls using WiringPi. In this chapter, we’ll modify the circuit (slightly) and the program (a bit more) so that we can read data in as well. We’ll do it two ways, since it’s not a very big topic by itself: polled and interrupt driven. Once again, WiringPi makes this easy.

Let’s go ahead and modify the circuit first.

The Stuff You Need

We’re adding exactly one part and some wire for this project. It’s a short list.
  • Raspberry Pi and Larson (Memorial) Scanner ...

Get Raspberry Pi for Arduino Users: Building IoT and Network Applications and Devices 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.