coding

One of the strongest tools an engineer can utilize is the ability to program and create custom instructions for a computer to follow. This section exemplifies some past projects where I have used coding to advance the capabilities of my projects.
Summer robot programming
For more details of the physical robot, please view the robotics section. If the PC is considered the brains, and the robot acts as an external limb, then the coding would be akin to the neurons firing. From every input received, to all the commands sent, these are all communicated through the coding. The majority of the different files were coded in Python3 to both receive and process information. The glove component included an Arduino Nano, so the script was written in C++. To connect all the individual nodes, ROS was implemented on Ubuntu with the PC as a master, the Raspberry Pi as a listener, and the Arduino transmitting over LAN with Bluetooth. The network of nodes were all publishing and subscribing to each other’s information to interact in real time. The image on the right highlights how each of the nodes communicated.
Matlab Image Colour randomizer
As we all know, every image consists of thousands, often times millions, of individual pixels that all come together to make a picture. Each of these individual pixels is made up of the colours red, green, and blue (RGB). For each pixel, they are assigned a certain amount of each colour to appear as a new colour. For this project, I manipulated these very properties by treating the image as a 3 dimensional matrix with 3 layers for each of the colours. By randomly switching the raw values corresponding to each colour, I was able to achieve a different hue while preserving the original image. Finally, I applied these changes to every 50 x 50 pixel square of the original to achieve a new mosaic image.
C Coding tic-tac-toe
Over the course of the summer, I took it upon myself to extend my coding abilities by taking a course in C programming. Through several mini projects, I was able to develop my coding ability to use it as an asset for future projects. The project seen to the right is a game of tic-tac-toe that I created to be played between two users using functions, arrays, and logic. In addition, I also became very familiar with pointers, structures, and memory allocation and applied these to other projects in the course.
Programmable logic controller-ladder logic
In a typical manufacturing plant, there may be hundreds of different machines all following a routine to make a product. These machines need a way to receive direct orders as to what prerequisites must be met for them to operate, and when they need to stop (especially if something goes wrong), that’s where PLC’s come in. This project consisted of programming a simulation of a carwash, where each rung of the “ladder” indicates when an output would activate, and when they would wait. This particular project involved several AND/OR’s, timers, counters, switches, and stops.
















