Skip to Main Content
Practical Python Programming for IoT
book

Practical Python Programming for IoT

by Gary Smart
November 2020
Intermediate to advanced content levelIntermediate to advanced
516 pages
11h 24m
English
Packt Publishing
Content preview from Practical Python Programming for IoT
Advanced IoT Programming Concepts - Threads, AsyncIO, and Event Loops

In the previous chapter, we learned how to detect movement with a PIR sensor, as well as measure distances and detect movement with ultrasonic sensors and Hall-effect sensors.

In this chapter, we will discuss alternative ways of structuring our Python programs when we are working with electronic sensors (input devices) and actuators (output devices). We will cover the classic event-loop approach to programming, before moving on to more advanced approaches, including the use of threads in Python, the publisher/subscriber model, and finally, asynchronous I/O programming with Python.

I guarantee you that there are many, many blog posts and tutorials across the internet covering ...

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

Hands-On MQTT Programming with Python

Hands-On MQTT Programming with Python

Gastón C. Hillar
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
Robust Python

Robust Python

Patrick Viafore

Publisher Resources

ISBN: 9781838982461Supplemental Content