ใบงานที่4

เซ็นเซอร์วัดความชื้นในดิน
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor

void setup() {
// declare the ledPin as an OUTPUT:
Serial.begin(9600);
}

void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
delay(1000);
Serial.print("sensor = " );
Serial.println(sensorValue);
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

งานที่13

งานที่15

งานที่10