Fab Academy

Write an application that interfaces with an input or output device that you made


This week’s assignment was to write an application that interfaces with an input or output device that i made, comparing as many tool options as possible. I have never done any interface or application programming before so this will be new for me. I decided to start this week off by modifying Neil’s code for the hello.mag.45 i made in the input week.


Modifying the hello.mag.45 code


To start editing in linux i got to the terminal and wrote gedit hello.mag.45.py Then a text editor file poped up and i could mess with the code.



I started of by just changing the window size from 600 to 900 and i also changed the colors of the two columns from red and blue to green and pink.



Now i wanted to try and change the shape of the graph, so i changed the columns into two thin lines by turning:

canvas.create_rectangle

into

canvas.create_line



Then I also changed the shapes into ¼ of a circle and then full circles. Next i changed the size and font style of the number which measures the magnetic field with the hall sensor.



I changed the size and the font size by changing this:

canvas.create_text(.1*WINDOW,.125*WINDOW,text=".33",font=("Helvetica", 24),tags="text",fill="#0000b0")

into

canvas.create_text(.1*WINDOW,.125*WINDOW,text=".33",font=("Times New Roman", 38),tags="text",fill="#0000b0")



This week was not really good for me, i hopfully will be able to add somthing better to this week in the future


Files

Python File