Sensor Workshop: Actions, Events, and Filtering
Arduino code here.
Processing code here.
For this assignment I added some simple filtering to my homemade color sensor code. I added a button which you press when there is no object on top of the color sensor, and it records the color values and will stop spitting out color values serially if the red, green, and blue values are all within 10 of the value recorded when the button was pressed. So basically once you do this, if nothing is on top of the sensor it will stop sending values until you do put something on it. It works well, exactly as described, but of course it could create problems if you're testing an object that actually is that color! Being that I'm still not sure what people would use a homemade color sensor for besides various zany interactive art things I'm not sure if that's a problem.
The one project I'm planning on using this sensor for is an installation in a large room in which I'm going to mount a bunch of them all over the walls of a large empty room. I'm going to hand out flashlights of various colors and allow people to control sounds by pointing the flashlights at the sensors all over the room. For this project the filter should be useful, since I don't want any sounds happening if there isn't a bright light being pointed directly at the sensor.