Skip navigation

..the code

Each time the pressure sensor is pressed it closes a circuit. Thanks to a program that we wrote in wiring, the board reads the signals of the sensor, and pass this information to a program written in processing.

img_2632.jpg

+ to fully understand the program, download the flowchart

In processing, each time you need to stream a video or record it, is necessary to create a variable to assign its parameters later in the program. But, if you want to create a video, show it in real time, then save it and show it on loop, you need to separate carefully the different processes you assign the variables. Processing can’t save and record at the same time, no matter how hard you try.

That’s why we decide to separate our processing program in 4 main zones divided by case/break statements:

case 1: our initial state, program waits for a signal
case 2: program opens en empty .mov file
case 3: program records a movie OR shows a movie
case 4: program shows a movie

Then we add the two waves (current and future level of the water), which are rendered randomly thanks to some calculations made by the program. In the final stage of the programming process we add various filters to distinct showing/registering processes, and then address some framerate issues.

Some buffer problems remains, mainly related to the power of the hardware. A pc with a bigger and faster processing capacity can helps, but we think that an effective way to clean buffers via processing could solves the problem better.

+ download processing code