19751| 8
|
[求助] 提示:exit status 1 为开发板 Arduino/Genuino Uno 编译时出错。 |
目的是实现按一下开关led亮,再按以下led灭,请高人指点,谢谢! #define led 13 #define button 7 int BTwant=0; int BTstateing=0; int BTstated=0; void funcon() { pinMode(led,OUTPUT); pinMode(button.INPUT); } void loop() { BTstateing=digitalRead(button); delay(10); if ((BTstateing ==HIGH)&&(BTstated=0)){ BTwant=1; } if ((BTstateing ==HIGH)&&(BTstated=1)){ BTwant=0; } if (BTwant=1){ digitalWrite(led,HIGH); BTstated =1; } if (BTwant=0){ digitalWrite(led,LOW); BTstated =0; } } |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed