Skip to Content
Internet of Things with Python
book

Internet of Things with Python

by Gastón C. Hillar
May 2016
Intermediate to advanced content levelIntermediate to advanced
388 pages
9h 9m
English
Packt Publishing
Content preview from Internet of Things with Python

Summary

In this chapter, we learned how to work with analog inputs to measure voltage values. We understood the impact of the different bits of resolution for the analog to digital converter and we wrote code that converted the raw units read into voltage values.

We measure voltages with an analog pin and both the mraa and the wiring-x86 library. We were able to transform a variable resistor into a voltage source and make it possible to measure the darkness level with an analog input, a photoresistor and a voltage divider.

As in the previous chapters, we continued taking advantage of Python's object-oriented features and created classes to encapsulate voltage inputs, darkness sensors, and the necessary configurations with the mraa and wiring-x86 ...

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

Getting Started with Python for the Internet of Things

Getting Started with Python for the Internet of Things

Tim Cox, Dr. Steven Lawrence Fernandes, Sai Yamanoor, Srihari Yamanoor, Prof. Diwakar Vaish

Publisher Resources

ISBN: 9781785881381Supplemental Content