Achindra Bhatnagar
Published © MIT

DIY Anemometer: Wind Speed Sensor Device

Anemometer or a wind speed measuring device is a common weather station instrument. It was costly online, so I built one!

IntermediateFull instructions provided2 hours75,460

Things used in this project

Story

Read more

Schematics

Anemometer

Code

Anemometer

Arduino
This code reads wind speed data on analog port 0 and lights up an LED
int ledPin = 9;

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

void loop() {
 int sensorValue = analogRead(A0);

 //Map 0-1023 to discrete 0-50-100...250 values for LED
 analogWrite(ledPin, sensorValue * (51.0 / 1023.0) * 50);
 
 if(sensorValue > 0){
    Serial.println(sensorValue);
    Serial.print(" ");
 }
}

Credits

Achindra Bhatnagar

Achindra Bhatnagar

20 projects • 161 followers
Windows Kernel Hacker, IoT Hobbyist, Enthusiast, Developer and Dreamer

Comments