16 lines
299 B
Arduino
16 lines
299 B
Arduino
|
byte sensorHum = A7;
|
||
|
byte humedad;
|
||
|
|
||
|
void setup() {
|
||
|
Serial.begin(9600);
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
humedad = map(analogRead(sensorHum), 0 , 1023, 0, 100);
|
||
|
//int humedadReal = (int)(humedadBruta * 0.09765645);
|
||
|
Serial.print("Humedad: ");
|
||
|
Serial.print(humedad);
|
||
|
Serial.println("%");
|
||
|
delay(2000);
|
||
|
}
|