Week 14

May 03: Interface and application programming

List of task this week

- Group assignment: Compare as many tool options as possible
- Write an application that interfaces a user with an input &/or output device that you made

Group assignment

To see the group assignment go here.

My thoughts on this week’s group assignment, Compare as many tool options as possible: I don’t have much to say about this week we went over a few of the options that are out there and it was sort of interesting.

Write an application that interfaces a user with an input &/or output device that you made

I first tried Neil’s code with my hall sensor but unfortunately that did not work so I decided to use a board with a button. I tried to use Arnars code but again that didn't work even with Arnars help it would not work. So to try to get through this week I got help from ChatGBT and then it finally worked.

But how I got started when I was trying to make the hall sensor work with this, is I copied the code from the Fabacademy site and put it into note pad and saved it as .py. now I had a .py file and when I double clicked it, it opened in VScode and there I had to install a Python ad on. After that I had to get py serial so I wrote in the terminal pip install pyserial. However like I said earlier this did not work so I got a board I made with a button to try Arnars code again did not work.

To try to get something working Arnar suggested I try Chat GPT, below are the questions I asked to get this code.

As ChatGPT told me I had to get pygames so I went to the terminal and wrote pip install pygame.

I took the ide code and loaded it on to the board from week 8 with Arduino IDE.

I describe above how I put py in VScode and that I put the ide code on the board, now to make serial window show up I went to the terminal and wrote python hall.py COM5 (hall.py because that is the name of the file and COM5 because that was the COM as seen in Arduino ide)

And then it was just to try it and it worked

Here you can see how to change the code to make the boxes a different color.

Links

Download Arduino file

Download py file