Recitation 10—— Rujun Zhang (Marcela)

In this recitation, I tried to use tilt switch sensor to control the image I inputed in processing.  My idea was inspired by the reading “Computer Vision for Artists Designers“, since it mentioned about using some sensor to catch up actions from people. Therefore, I wonder whether can I use gradient to reflect the rotation of pictures. I also used potentiometer as another case to be the contract. 

At the beginning, I inputed a gif into processing and I tried my best to make it played in processing. However, I found there was no libraries for gif and even I download some sources from Github, it still had some problem. I had to give up this idea to use image as my target. I draw a lot pictures on the screen and then I used rotate function. The output of sensors will be the parameters of this function. 

I learned how to use tilt switch sensor but I met a problem I could not solve. The output of tilt switch sensor was very very unstable. Sometimes it provided a value of 1023 and a slight change will make the value becomes 0. The results were very strange. Although at last, the interactions on the  screen were not different from using potentiometer, the moving of graphs was not smooth. So in the future, if I want to use this tilt switch, I should figure out how to adjust its output.

The video below is using tilt switch sensor:

The video below is using potentiometer as sensor:

The code is below, I saved it as PDF

Ardunio

processing

Leave a Reply