Skip to content

Eye Dilation Simulator

monicaflores10 edited this page Nov 1, 2017 · 1 revision

The Goal

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.

The Process

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.


Water Level Sensor


Then, I connected it to the arduino and created my arduino code.


Arduino



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.


Eyeball


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.

Clone this wiki locally