- Wed Nov 11, 2020 4:21 pm
#43508
Im using arduino version 1.8.13. Im using a 9.6 volt battery. Im using the example code given on the website.
Its seems like the windsensor is not calibrated , because the voltage values goes from 0V and up to 5V and down to 0V again, over and over. Its doing this while the windsensor is standing still or spinning.
I appreciate all the help i can get.
Its seems like the windsensor is not calibrated , because the voltage values goes from 0V and up to 5V and down to 0V again, over and over. Its doing this while the windsensor is standing still or spinning.
I appreciate all the help i can get.
Code: Select all
/*
Connect the voltage signal wire to Arduino analog interface:
Yellow Cable<---->A0
*/
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A0);
float outvoltage = sensorValue * (5.0 / 1023.0);
Serial.print("outvoltage = ");
Serial.print(outvoltage);
Serial.println("V");
int Level = 6*outvoltage;//The level of wind speed is proportional to the output voltage.
Serial.print("wind speed is ");
Serial.print(Level);
Serial.println(" level now");
Serial.println();
delay(500);
}