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 ...

Get Python Programming for Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.