首页 > 其他 > 详细

arduino 用电位器调节LED闪烁频率

时间:2015-08-08 11:48:34      阅读:688      评论:0      收藏:0      [点我收藏+]
int dianwei;
int led = 13;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(led,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
 dianwei = analogRead(A0);
 Serial.println(dianwei);
 digitalWrite(led,HIGH);
 delay(dianwei);
 digitalWrite(led,LOW);
 delay(dianwei);
 
}

 

原文地址:http://jt.satxt.com/arduino/arduino-y-d-w-q-d-j-led-s-s-p-s.html

arduino 用电位器调节LED闪烁频率

原文:http://www.cnblogs.com/lnooge/p/4712687.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!