Interface and Application Programming

The Assignment for week 16:

This week we were given the assignment to write an application with our input from week 11 and/or our output devices from week 13.

Original:

type "python hello.temp.45.py /dev/ttyUSB0" from a terminal window to start this program. Make sure you are in the proper folder.

After:

type "python karen-03.py /dev/ttyUSB0" to start this program

Here is an image of my screen after a couple of days of python. One thing I do like about python is that it does not have to be compiled. Just code and run and get your errors right on the command line. How fun is that .....

I was able to locate a couple of web site tutorials on drawing in python, manipulating text, changing colors, adding different window headings. One of the things I wanted to accomplish was to convert Celcius into Farenheit, but I could not figure out how the program handled getting the tempreature into what I am assuming is Celcius.

Instead of using the WINDOW variable multiplied by some number to size the rectangles, I wanted to get a handle on the absolute coordinates. One thing that baffled me was the location of the original location of the two rectangles. Take a look at the coordinates of all three rectangles in my program. I am thinking it has something to do with "tags=". Right now this is the best it is going to get.

Instead of using (T* (9/5)) in the formula for converting to Farenheit, we found out we needed to use (T*1.8).

Files Used:

  • Neil's original program
  • Karen's modified program
  • Drawing Tutorial
  • Python Colors

  • HOME