arduino works as a stand alone computer here, sitting in our corridor and watching the lights. when ever the lights are turned on or off, arduino will twitter accordingly. it will try to be a bit funny in its comments and also count the number of times lights have been switched on or off. clearly, a machine that nobody needs, but still fun and a good way to bring the physical world into the internet digital world.
<– click here to view the twitter news feed of the test run during 16 hours.
below a photo of the hardware and how it actually looked like in our corridor.
the arduino ethernet shield sits on top of the arduino. then the basic setup is quite straight forward: a light sensor is plugged into 5v on one side. the other side is connected to a 10k resistor, as well as an anologue pin. from the resistor a third cable goes into ground (see fritzing image). this is done to split the voltage.
here you can find my coding for the project. i used the arduino twitter library by neo cat to make twittering easy and comfortable. it works pretty well and is easy to setup. a slight problem is that twitter tends to forbid the same posting twice or several times in a row. so you have to make every tweet unique.