Arduino 学习上拉电阻和下拉电阻遇到的问题
2015-11-22 17:26
513 查看
1.如果不存在电阻,输入引脚就不连接任何东西(悬空),因此电压是浮动的,Why?
援引资料讲解:
![](https://img-blog.csdn.net/20151122172706328)
![](https://img-blog.csdn.net/20151122172813221)
Fig 5.3 Our two alternative switch wiring possibilities
For example, in these schematics we can connect and disconnect pin 2 to 5V, or we can connect and disconnect pin 2 to ground. In both cases, as long as the button is held down, the pin is connected to a valid input voltage. When the button is released, though, pin 2 is not connected to anything. This is called a floating input voltage. Basically, it’s invalid input!
Try building up one of these schematics, and trying out the switch testing sketch above. When the button is held down you should definately get the right printout. When its released, it may keep the old value, or it may change, but its certainly not reliable!
Above correct reference the below pics:
![](https://img-blog.csdn.net/20151122172947714)
援引资料讲解:
Fig 5.3 Our two alternative switch wiring possibilities
For example, in these schematics we can connect and disconnect pin 2 to 5V, or we can connect and disconnect pin 2 to ground. In both cases, as long as the button is held down, the pin is connected to a valid input voltage. When the button is released, though, pin 2 is not connected to anything. This is called a floating input voltage. Basically, it’s invalid input!
Try building up one of these schematics, and trying out the switch testing sketch above. When the button is held down you should definately get the right printout. When its released, it may keep the old value, or it may change, but its certainly not reliable!
Above correct reference the below pics:
相关文章推荐
- UIBezierPath绘制图形
- java获取request的 ip port
- UIView
- LeetCode 063 Unique Paths II
- Android(13)java中的线程回顾,Android线程,主线程(UI线程)
- POJ1679The Unique MST(次小生成树)
- 第九章 UI布局管理器
- break continue详解
- 第八章 高级UI组件
- easyui环境搭建02
- Unique Paths II-leetcode
- cocoapods 0.35.0 版本 报错 Parsing unable to continue due to parsing error:
- UIBezierPath的自定义路径绘图
- LeetCode 062 Unique Paths
- CALayer 为什么选择 cg 开头 而 不选择 UI 开头
- Hbuilder--让手爽,飞一般的编码(二)
- ios UIButton的创建和使用入门
- UILabel
- HDU5538 House Building(简单计算)
- [leetcode-307]Range Sum Query - Mutable(java)