Blog

Arduino Motion Sensor Server

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".

Arduino Motion Sensor Server

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:

Arduino Motion Sensor Server

Permalink: https://hanez.org/2011/05/25/arduino-motion-sensor-server/

Danmark

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... ;)

Permalink: https://hanez.org/2011/05/08/danmark/

Arduino LM35 temperature sensor

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...

Arduino LM35 Wiring

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:

float temp;
int tempPin = 0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  temp = analogRead(tempPin);
  temp = temp * 0.48828125;
  Serial.println(temp);
  delay(1000);
}

My output in the serial monitor of the Arduino IDE looks like this:

Arduino LM35 output

Permalink: https://hanez.org/2011/04/11/arduino-lm35-temperature-sensor/

Pages

NULL
Page generated at: Feb 16, 2024 (CET/CEST) using Jekyll on GNU/Linux @jupiter
Powered by: NULL