HW8: In-class Exercises (moving ellipse, LED brightness, gravity wind example…)

EXERCISE 1

Task description: Make something that uses only one sensor on Arduino and makes the ellipse in p5 move on the horizontal axis, in the middle of the screen, and nothing on Arduino is controlled by p5.

schematic used
setup used for all three exercises

Here is the link to the p5 code with the Arduino code commented out at the end of it.

If the video window doesn’t show, use this link to see the demo.

EXERCISE 2

Task description: Make something that controls the LED brightness from p5.

Here is the link to the p5 code with the Arduino code commented out at the end of it.

If the video window doesn’t show, use this link to see the demo.

EXERCISE 3

Task description: Take the gravity wind example and make it so that every time the ball bounces one led lights up and then turns off, and you can control the wind from one analog sensor.

Here is the link to the p5 code with the Arduino code commented out at the end of it.

If the video window doesn’t show, use this link to see the demo.

 

Leave a Reply