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 Entry() widget – providing manual user inputs


In the previous exercise, you used a button to blink the LED on the Arduino board for a fixed amount of time. Let's say that you want to change this fixed time delay and specify a value according to your application's requirement. To perform this operation, you will need a widget that accepts custom values that can then be converted into the delay. Just like any other GUI framework, Tkinter provides the interface for a similar widget called Entry() and we will utilize this in the next exercise.

Keep the same Arduino and LED configurations that you used for the previous exercise and open the exampleEntry.py file. In the beginning of the code, you will find the same configuration for the Arduino board and the LED pin that we used in the previous exercise. Moving on to the next stage, you will be able to see the following code snippet that defines the root widget. In this code snippet, we have changed the title of the main window to reflect the...

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