-
Notifications
You must be signed in to change notification settings - Fork 3
Eye Dilation Simulator
I got my eyes dilated and OH MY GOD daylight hurts. I wanted to create something that could simulate the dilation of the pupil and a feeling of discomfort. I would use a water level sensor to map the dilation of the eye and the p5 oscillator to use pitch as a feeling of discomfort.
I ordered a funduino water level sensor that didn't come with the wires I needed to connect it to the arduino. Luckily, the soil moisture sensor I had ordered first came with them.
Then, I connected it to the arduino and created my arduino code.
I mapped the data of the sensor to the height and with of the ellipse and created an if statement for the oscillator 95 sound—if the height and width of the ellipse were greater than 100 the oscillator would play. I originally wanted the pitch to be mapped with the height and width of the ellipse but my code wouldn't work so I just used an if statement.
To construct my eyeball I used a Corralejo Reposado Tequila shot glass, cardboard from a pizza box, and a picture I printed from google.
It's not a super stable project because the sensor is so sensitive. When I dip the sensor in and out the ellipse doesn't go down to its original because it still detects the water thats left on it when I take it out, this causes the oscillator to not turn off either unless I dry the sensor or stop the sketch.
Here's the video.