I wrote a program in processing that reacts to how vigorously you shake an accelerometer.
The arduino communicates the sensor's readings through a serial connection to processing. I used a smoothing function, in my arduino code, to get clean values from the accelerometer, which tends to give very eradict readings otherwise.
When you first open up the processing app, it is a calm, blue day.
If you make it so that the sensor's readings match up on the x- and y-axis, you plant flowers on the screen.
Slightly shaking it causes the blooms to blow...
Quickly shaking it causes a rain storm (and all the flowers blow away)
Leaving the sensor alone for 10 seconds let's the storm go away, returning you to a clear day.
Download Processing and Arduino code
Subscribe to:
Post Comments (Atom)
1 comment:
Great work.
Post a Comment