15. Interface and Application Programming¶
This week I …
Group work: Comparing tools for creating GUI for input/output week projects¶
Me, Mona and Ken worked together to compare five tools.
Our group work is documented at Mona’s site.
Tkinter¶
Tkinter package (“Tk interface”) is defined as the “standard Python interface to the Tk GUI toolkit”.
First thing to get strated with tkinter is to install Python. Newest version at time of this group work was 3.9.5, which was installed. Tkinter is installed by default in Python installation.
After installation, Tkinter can be tested by running python -m tkinter
in command line.
Clicking button adds [ ] brackets around “Click me!” text. Screenshots after 1 and 3 clicks.
Simple GUI with Tkinter¶
With help of Iván’s Gitlab wiki pages and GitHub repository and John Elder’s Youtube video‘s first 30 minutes, creating basic elements with Tkinter was easy.
Starting with import, Tk() and mainloop() commands, empty Tkinter window can be produced.
Adding labels (text boxes) and button is quite easy, but packing those to window must not be forgotten!
Tkinter code and window it creates:
Tkinter window after 3 clicks:
Why this group work exists in duplicated location?¶
This group work could be removed from my site, but because I finished my part of group work by testing it on my page it might as well exist as a introduction to my individual assignment. Also this part was used to convert markdown to html by viewing source code of uploaded site and sending relevant part of it for Mona to include in group work as her site doesn’t use markdown.
Individual work: GUI for distance sensor from input week¶
I don’t plan having GUI for my final project, so this week I’ll just aim to complete with minimal effort. From my input week I’ll be using ATtiny1614-based board and VL53L1X distance sensor.
First thing is to upload the sketch I used on input week to my board and verify it sending serial data to pc via UART. Board seems to work and I can focus on how to receive and present the data it sends.