Skip to Content
Python Programming for Arduino
book

Python Programming for Arduino

by Pratik Desai
February 2015
Intermediate to advanced
400 pages
9h 49m
English
Packt Publishing
Content preview from Python Programming for Arduino

Stage 1 – a smart power strip with Arduino and relays

The hardware of Tweet-a-PowerStrip contains Arduino as the main controller unit that interfaces with the relays and the Ethernet Shield to communicate with the computation unit. The Arduino code implements the MQTT client, using the PubSubClient library to publish and subscribe to the topics. Although we are using some example appliances to control the use of the relay, you can select any other appliance you own. You can also use a commercial power strip instead of an individual power plug.

Hardware design

While assembling the hardware components, as displayed in the following diagram, make sure you are precise in connecting the appliances with the AC power plugs. One wire of the AC plug is directly ...

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

Python Programming with Raspberry Pi

Python Programming with Raspberry Pi

Srihari Yamanoor, Sai Yamanoor

Publisher Resources

ISBN: 9781783285938Supplemental Content