There's more...

The following allows us to define an alternative version of the device class in data_adc.py so it can be used in place of the ADC module. This will allow the remaining sections of the chapter to be tried without needing any specific hardware.

Get Raspberry Pi 3 Cookbook for Python Programmers - Third 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.