April 2018
Beginner
552 pages
13h 58m
English
As we saw previously (in Chapter 10, Sensing and Displaying Real-World Data), wiringpi2 allows us to easily adjust our code to make use of I/O expanders using I2C. In this case, it can be useful to add additional circuits, such as sensors and LED status indicators, and perhaps even displays and control buttons, to assist with debugging and controlling the Rover-Pi robot as you develop it.
It can be particularly helpful if you intend to use it as a tethered device, since you will only require three wires to connect back to the Raspberry Pi (I2C Data GPIO Pin 3, I2C Clock GPIO Pin 5, and Ground GPIO Pin 6), with I2C VCC being provided by the motor controller 5V output.
As shown in the earlier example, add defines for the ...