Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Programming for Arduino

You're reading from  Python Programming for Arduino

Product type Book
Published in Feb 2015
Publisher
ISBN-13 9781783285938
Pages 400 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Python Programming for Arduino
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Python and Arduino 2. Working with the Firmata Protocol and the pySerial Library 3. The First Project – Motion-triggered LEDs 4. Diving into Python-Arduino Prototyping 5. Working with the Python GUI 6. Storing and Plotting Arduino Data 7. The Midterm Project – a Portable DIY Thermostat 8. Introduction to Arduino Networking 9. Arduino and the Internet of Things 10. The Final Project – a Remote Home Monitoring System 11. Tweet-a-PowerStrip Index

The Checkbutton() widget – selecting LEDs


While developing complex projects, you will encounter scenarios where you have to depend on the user to select single or multiple options from a given set of values. For example, when you have multiple numbers of LEDs interfaced with the Arduino board and you want the user to select an LED or LEDs that need to be turned on. This level of customization makes your interface more interactive and useful. The Tkinter library provides an interface for a standard widget called Checkbutton() that enables the manual selection process from the given options.

In this exercise, we are going to work with both the LEDs, green and red, that you connected to the Arduino board at the beginning. The entire Python program for this exercise is located in the code folder with the name exampleCheckbutton.py. Open the file with the same editor that you have been using all along. This program implements the Checkbutton() widget for users to select the red and/or green LED...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}