I tinkered a little bit this evening and I have added a motion sensor to the Arduino platform. After that I added a network shield and have coded a small HTTP server... This server provides just a 0 or an 1. 0 if I don't have moved around; 1 if I am dancing on the desk... ;) The sensor works with a radius of about 5 to 7 meters and it is really a lot of fun. You could get such sensors very cheap at ebay, just search for "arduino motion sensor".
I am getting the status every second using wget and are displaying the output in xterm. It looks nice to see how much I am moving when writing this Blog post:
I was on holiday in Denmark last week. It was a great time. Since I was on a danish school, I were there many times in my youth. I felt very well @home... ;)
I am ill today and needed to distract me some bit.
I added a LM35 temperature sensor to my Arduino. Since someone did the work already, I only needed to copy some code and setup the wiring on a breadboard. I used the same wiring like in the link. Below is an image of the wiring made with Fritzing. I am using a LM335 for this because there where no LM35 as a Fritzing part available...
I changed some parts of the code to only print the temperature as String to serial. In the original code the data was sent as (byte) over serial to read the value with an application created using Processing. Feel free to change this again... ;) This is the code I used:
int tempPin = 0;
temp = analogRead(tempPin);
temp = temp * 0.48828125;
My output in the serial monitor of the Arduino IDE looks like this: