EXPERIMENT 9: Let's talk about Processing Ya'll! Build and control your own video games
In this experiment we will be using an open source coding environment called Processing that started in 2001. The Arduino IDE came out of Processing so they are related. Processing was created to make computer graphics for students and makers. So enjoy the games, your imagination of how far you take them is your only limit!
We will use a combination of Arduino programs and Processing programs. The IDEs are similar. Processing will take care of graphics and sound while Arduino will take care of the inputs and outputs hardware values. For the experiments all I have is a potentiometer connected to port A0 and an HC-SR04 sonar connected. Read Arduino code for pin numbers. Those are the only two sensors connected.
Download the latest Processing here (works with Windows, Mac OS, Linux, etc. : https://processing.org/download
Note: Main thing to look out for is having your COM port correct in the code, baud rate speed matches and that the COM port is not opened or used by another serial program before running the Processing sample. Some samples require you to import libraries and is simple in Processing just to the Sketch menu and import library - you can look for it or download it from original sources. Library you will need to import is import ddf.minim.
Check out the Youtube video for sample and explanation of each game! Enjoy! (I did!) I love this experiment - takes me back to when I was a kid in the 80's coding games in my TRS-80 computer.
We will use a combination of Arduino programs and Processing programs. The IDEs are similar. Processing will take care of graphics and sound while Arduino will take care of the inputs and outputs hardware values. For the experiments all I have is a potentiometer connected to port A0 and an HC-SR04 sonar connected. Read Arduino code for pin numbers. Those are the only two sensors connected.
Download the latest Processing here (works with Windows, Mac OS, Linux, etc. : https://processing.org/download
Note: Main thing to look out for is having your COM port correct in the code, baud rate speed matches and that the COM port is not opened or used by another serial program before running the Processing sample. Some samples require you to import libraries and is simple in Processing just to the Sketch menu and import library - you can look for it or download it from original sources. Library you will need to import is import ddf.minim.
Check out the Youtube video for sample and explanation of each game! Enjoy! (I did!) I love this experiment - takes me back to when I was a kid in the 80's coding games in my TRS-80 computer.
Experiment instructions and files
pong_one_player.zip |
two_player_pong.zip |
radar.zip |
flappy_bird.zip |
plane.zip |
forward_kinematic.zip |