![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
arduino
damo王
这个作者很懒,什么都没留下…
展开
-
数字IO
/×2013-01-28 recorded by wyj at home.×/ pinMode(pin,mode); pin参数为数字引脚,模拟引脚也可以作为数字引脚使用。 mode参数为INPUT和OUTPUT两个宏。 背景知识: arduino UNO 0~13引脚为数字引脚。其中3,5,6,9,10,11共6个可作PWM输出。在串行通信中,0脚作为RX,原创 2013-01-28 12:14:15 · 1210 阅读 · 0 评论 -
模拟IO
analogReference(type); type可取值DEFAULT/INTERNAL/EXTERNAL三个宏,表示默认电压5V / 低电压模式,使用便内基准电压源 / 扩展模式 通过AREF引脚获取参考电压。 analogRead(pin); 读取pin引脚模拟电压值,每读一次需要100us时间。电压值范围在0~1023之间。 analogWrite(pin,val原创 2013-01-28 23:15:00 · 766 阅读 · 0 评论