I N T E R F A C E A N D A P P L I C A T I O N P R O G R A M M I N G

A GUI INTERFACE

The assignment was to create a user interface that communicates with an electronic.

THE PROCESS:

1-Make the GUI
2-Program the board
3-Make them communicate

I decided to continue using the LED array since it had worked well in the previous week and I had been able to begin understanding the code.

First, I made a sketch of what I wanted the GUI to look like and began trying to achieve that using python's Tkinter library.

Originally, the code was pretty easy and I quickly created checkbuttons analogous to the LED array.

After figuring out this part, I tried to continue with the plan, to make a 'draw' portion of the GUI where you can see what buttons you have pressed.

I was able to get the label to change color on the right once I pressed the button, but couldn't get it back to black once I unchecked the button.

After debugging and trying many different things, I realized I needed to work with the onvalue and offvalue parameters as the value of the checkbutton wasn't truly changing (when I tried using print variable, I got the results above), then I would have to bind the values with an even (I think).

The rest of the week-- on the python side (trying to get it to work how I wanted) and on the c side looked like this:



Lessons Learned

It takes time to learn how to speak a specific code language-- a week is not enough.

 

H O W T O M A K E ( A L M O S T ) A N Y T H I N G

M A R I A A N ( T O N I ) A B O T E R O