This year, I took a course at Camosun called OS and Architecture (ICS-113). The course focused on a lot of interesting concepts including memory management, error correction, and virtual machines, but the most satisfaction came from our work with Python and the Raspberry Pi.
The first experience with the Pi tasked us with programming some simple button presses. This was a big step into learning how to manipulate the Pi-Hat that contained all of our IO elements, but it was a good introduction on how we define elements such as physical buttons, lights, and how to interact physically with the code.
The desired output was pretty simple. One button counted upwards and another reset the counter. Corresponding to the current counter value, there were three LED lights
This was a rewarding start and good experience for the next project.
Soon after, we had another Pi task. This time it involved incorporating another piece of the Pi-Hat: the temperature sensor. Better yet, we had to be able to reach the output via the browser on another computer.
The nice part was that, with the right modules installed, the Pi produced a file with the most recent temperature. We used one Python file to receive and encode the output from the Pi and another file to analyze that output and perform our desired operations.
The output here needed lights as well:
This meant that I had to store the temperature in another file each refresh and pull that number back to check against the current temperature. This part actually wasn't too bad.
The hardest part came from the web server implementation. I used the mod_wsgi express module to run the main Python file, and after opening a few necessary ports, it was seemingly good to go.
One last challenge: I was unaware the webpage was expecting an array of UTF-8 Strings. It took a lot of experimenting, researching, and reviewing the server logs, but eventually I got it to work. There's nothing like the feeling of success after a tough challenge.
Every New Year's, my wife and I carry on my wife's family tradition of putting on a Japanese dinner. It's a lot of work, but after so many years, we make a mean gyoza. She's often thought there was more we could do for delivery of the food, and then we discovered this link to a line following robot.
It's a hurdle, and I don't know if it's an achievable goal this season (especially considering holiday shipping times), but can you imagine this robot towing a small train of sushi? Sounds like a good time.