Week8 Reflection

Wentai Ouyang - Sun 3 May 2020, 8:18 pm
Modified: Sun 3 May 2020, 8:26 pm

What I did?

After I got the punch card reader idea last week, the main task I did this week is searching for the useful informations to achieve the function. My original idea is using the punch card reader to read the programming statement fragment of each card, and then these code will be sent to phpMyAdmin, and the front-end can fetch the data and show them on the browser. But after I searched for a lot of tutorials, I found that linking the Arduino with database cannot be achieved without ethernet shield, so I borrowed a ethernet shield and ESP 32 from Lorna, and I hope the function could work.


I tried to link the ethernet shield with my arduino board, but some errors occurred when I upload the sketch to my arduino. (avrdude: stk500_recv(): programmer is not responding) I have no idea why it happened. So I searched for the reasons of this problem, and I found that the problem may have occurred on pins 0 and 1 of the ethernet shield board, and a short circuit may have occurred, but I did not find damage on the board, so this problem has not been solved. I asked tutor about this question but it has not been answered yet.

So, I have to find another solution to solve it. My friend Wally gave me an idea that with serialport and express library of Node.js, I can read the Arduino data and send it to the browser and I did it, the data wiwas transfer to the terminal, and I can use express to send it to the localhost api, and use axios to fetch the data to the browser.

Imgur Imgur Imgur

The front-end interface is like the second picture(have not done yet, the right part is game window...to be continued), when the user swipe the punch card, the code will show on the web-based IDE, and they can press the 'Run' button to use the code to control the game on the right part of screen.

Although the transfer data function is almost done, the punch card reader is not connect stable, so I plan to use the machine in UQ Innovate to build a better one. So on Friday, I made a reservation for the UQ Innovate, and built a wooden punch card reader. The first picture is the previous version. The material used is mainly cardboard, so it is not very sturdy and the connection is unstable. The second picture is a punch card reader made of wood, the recognition accuracy has been improved

Imgur Imgur Imgur

What I will do next?

In the next session, I will start to build the web-based game, and connect the software part and hardware part together and I also need to prepare for the prototype video and report on 11th May.