Arduino Uno编程 [英] Arduino Uno programming

查看:302
本文介绍了Arduino Uno编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Arduino的新手,只做了一点编码.我正在寻找的代码是执行以下操作:
我有一个按钮作为输入,五个LED作为输出.
第一次按下应关闭led1的电源,第二次按下应关闭led1和电源的led2,第三次按下应关闭led2和电源的led3,依此类推.
感谢您的指导.

I am new to Arduino and have done only a little coding. The code I am looking for is to do the following:
I have one push button as input, five led''s as outputs.
The first press should power led1, the second press should shut off led1 and power led2, the third press should shut off led2 and power led3, and so on.
Thanks for your guidance . It looks simple but it is beyond my current capability!

推荐答案

为什么你不看我在这个站点上的Arduino示例(向下滚动到硬件编程)呢?
http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=557325 [^ ]

并查看我网站上的一些Arduino示例;
http://www.dave-auld.net/index.php?option=com_content&view=category&id=53:arduino-input-output-basics&Itemid=107&layout=default [
Why don''t you look at my Arduino examples on this site (scroll down to hardware programming);
http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=557325[^]

and also have a look at some of the Arduino examples on my website;
http://www.dave-auld.net/index.php?option=com_content&view=category&id=53:arduino-input-output-basics&Itemid=107&layout=default[^]

There should be enough info in amongst those various articles (particularly the ones on my website) to get you going. :)


这篇关于Arduino Uno编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆