MIDTERM: Shake the Pigeons

Week 6
Assignment  |  MIDTERM  |  Test_01


Me and Dror decided that we're going to make a game, a shaking + shooting pigeons game. We used the accelerometer to get the data of the shaking gesture. There is a bit of calculation to calibrate the percentage of the shaking, so sensor data wouldn't be too sensitive. We also want to play with sound, so we added the speaker but we couldn't make it louder yet.

 

Test  |  Sound

Test  |  Shoot + Delay + Sound

Close-Up  |  Test  |  Shoot + Delay + Sound

My Sketch: Serial Input to P5.js IDE

Week 6
Assignment  |  My Sketch  


I worked on this week's labs in relationship with the Midterm Assignment. The goal is to used to read the Accelerometer sensors value on p5. But right now, I'm playing around with potentiometer to get the readings and how to apply the sensor values in p5 coding language. Simply put to understand the code and train my brain to split my thinking in half, Arduino side and p5 side. 

Working with p5.js IDE takes a lot of patience.......(I couldn't even save when I want to) but after a few hours of getting to know how to use Sublime and using terminal, things are smoother.

Labs: Serial Input to p5.js

The shaking pigeon is controlled by random() function through p5 at the moment. It will be controlled by Accelerometer for the midterm assignment.

Labs: Serial Input to p5.js

The input data from Arduino (potentiometer) works fine for a while, then the LEFT pigeon and feathers that are controlled by potentiometer froze . [ Video below ]
 

Labs: Serial Input to p5.js  [ Froze ]

Lab: Serial Input to P5.js IDE

Week 6
Assignments


When I was doing the Labs, I think I ran into a problem, because the sensor data sending from Arduino to p5 didn't work properly. The Number at the Top-Left Corner didn't move but when I changed to Serial.readLine(). The numbers changes according to the potentiometer. 

I probably made a mistake and didn't follow the labs steps accordingly..... 

Arduino Input to P5.js

p5.js IDE
Serial.read()

Arduino
delay(1);

Arduino Input to P5.js

p5.js IDE
Serial.readLine();

Arduino
delay(1);


Arduino Input to P5.js

p5.js IDE
serial.readLine()

Arduino
delay(100);

Arduino Serial Input to P5.js

p5.js IDE
Serial.readLine()

Arduino
delay(100);