Processing & Arduinos

Processing

A bulk of our classes involve learning more about coding. Serving as a platform to learn the basics of coding, we were recently introduced to Processing, a flexible “software sketchbook”, and “language for learning how to code within the context of the visual arts”. With it, users (especially students, artists, designers, researchers, and hobbyists) are able to create prototypes and learn. 

Since we (me, especially) were beginners in coding and programming, we were first taught the basics, and over time, we eventually learned more functions and picked up on more Processing terms. Through lessons in class and online tutorials, in addition to Processing terms, I learned more about the set up and draw function, variables, creating shapes, text, and colours, and making them move at different directions and speeds, as well as the printing functions. 

With this, we were tasked to apply our new knowledge and skills in creating a simple two-player Pong game. Using Processing, our game had to feature two moving rectangles, a moving eclipse that changed direction upon contact with either of the rectangles, a scoreboard, and a ‘game over’ screen. 

Challenges

As a beginner in programming, I faced difficulty in making the graphics move, mainly because I did not quite understand the math behind the x and y axes. I especially had difficulty in programming the eclipse in such a way that it changed direction when coming into contact with either of the rectangles. 

However, with online tutorials and help from friends (especially Jia Yi), I could better understand the coding terms. 

The Pong Game
Game Over

Arduino

In addition to Processing, we were also given insight on Arduino. Arduino is an “open-source electronics platform based on easy-to-use hardware and software”. With an Arduino board that reads inputs (such as lights on sensors and fingers on buttons) and turns them into outputs, users can send instructions onto micro controllers on the board, carrying out those instructions. 

With the use of the Arduino programming language and the Arduino Software, based on Processing, we were taught on how to light an LED light bulb. Plugging the USB cable into our laptops and with provided codes, we were able to light the LED bulb by connecting different pins. By adjusting the code, we could adjust the rates at which the bulb lit and its intensity.