nodemcuPhotoresister

mail@pastecode.io avatar
unknown
plain_text
2 years ago
327 B
2
Indexable
Never
//https://www.jianshu.com/p/23c58e3203b7
//nodemcu光敏電阻
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
    Serial.println(analogRead(A0));//光度亮時電阻值變低, 暗時電阻值變高
    delay(1000);
}