Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Python Programming for Arduino
  • Toc
  • feedback
Python Programming for Arduino

Python Programming for Arduino

By : Pratik Desai
4.6 (22)
close
Python Programming for Arduino

Python Programming for Arduino

4.6 (22)
By: Pratik Desai

Overview of this book

This is the book for you if you are a student, hobbyist, developer, or designer with little or no programming and hardware prototyping experience, and you want to develop IoT applications. If you are a software developer or a hardware designer and want to create connected devices applications, then this book will help you get started.
Table of Contents (13 chapters)
close
12
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...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete