Arduino程序-光敏电阻

尽管造书去做的。但还是有莫名的成就感


从串口显示出,电压变化,


void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  
}


void loop() {
  // put your main code here, to run repeatedly:
  int val=analogRead(A0);
  Serial.println(val);
  delay(500);
}





posted @ 2017-05-29 21:42  llguanli  阅读(446)  评论(0编辑  收藏  举报