Week 5 Serial Connect with Processing

Goal:

I want to create a use ultrasonic sensor and a photocell to send data and bytes to processing, that allows me create a sense of controlling nature force on digital screen.

Description:

The sum of sensor values from ultrasonic and photocell determines the opacity and position of particles inside the fog.

  • How it works: people use hands to move around the ultrasonic sensor and use finger to cover the amount of light through photocell to control the position and opacity of fog particles on screen

Problem:

The data sent from Arduino to Processing are within certain range which are hard to be calculated and mapped precisely into the Processing sketches. Also, the bytes are not stable. (Also, I forgot to write code for LED, but I think it does not matter that much)

Materials:

  1. Arduino UNO R3 x 1
  2. Breadboard x 1
  3. Ultrasonic sensor x 1
  4. Photocell x 1
  5. 220Ω Resistors x 1
  6. Wires

Connection Diagram:

Code:

Arduino

Processing:

Leave a Reply

Your email address will not be published. Required fields are marked *