▼ กำลังโหลดข้อมูล... ▼
แสดงความคิดเห็น
คุณสามารถแสดงความคิดเห็นกับกระทู้นี้ได้ด้วยการเข้าสู่ระบบ
กระทู้ที่คุณอาจสนใจ
อ่านกระทู้อื่นที่พูดคุยเกี่ยวกับ
Arduino
'' does not name a type
int sensorPin = A0;
void setup()
{
//Debug console
Serial.begin(9600);
}
void loop()
{
int sensorValue;
sensorValue = analogRead(sensorPin);
sensorValue = map(sensorValue, 0, 1024, 0, 100);
Serial.println(sensorValue);
if (isnan(sensorValue)) {
Serial.println("Failed to read from sensor!");
return;
}
delay(2000);
}