当前位置:网站首页>Arduino uno realizes simple touch switch through direct detection of capacitance
Arduino uno realizes simple touch switch through direct detection of capacitance
2022-06-28 00:17:00 【perseverance52】
Arduino The simple touch switch is realized through the direct detection of capacitance

Arduino In addition to receiving digital signals from digital ports , The only analog physical quantity that can be detected is voltage . The detection value of any analog sensor is almost converted into voltage value through relevant circuit , Then input its analog port for analog-to-digital conversion . Capacitance values require relatively more complex and expensive circuits to be converted into voltage values , Can be Arduino testing , And the detection of many physical processes , Can be easily and reliably realized by detecting the capacitance value .
Implementation method
Set a digital port to low potential , And open arduino The internal pull-up resistance of , Start to calculate the time required for this port to reach the high potential . And this time is related to the ground capacitance of this port , The greater the capacitance , The longer the time . On the hardware, you only need to connect a wire to one port . Touch the exposed end of this wire with your finger , Will cause capacitance change ,arduino This change can be detected by the above method . If you want to increase sensitivity , You can attach a piece of tin foil to the wire . To prevent you from having a strong static electric shock to puncture the chip , You can cover the tin foil with a thin layer of paper .
Sample code
No need for third-party libraries
// readCapacitivePin
// Input :Arduino pin number边栏推荐
- 积分体系和营销活动结合在一起有哪些玩法
- Cornernet understands from simple to profound
- Learning notes for qstringlist
- [PCL self study: pclplotter] pclplotter draws data analysis chart
- [PCL self study: pclvisualizer] point cloud visualization tool pclvisualizer
- 赛尔笔记|视频文本预训练简述
- 计数质数[枚举 -> 空间换时间]
- NDSS 2022 received list
- Golang uses Mongo driver operation - query (basic)
- Pytorch Foundation (1)
猜你喜欢
![Using two stacks to implement queues [two first in first out is first in first out]](/img/de/07297816f1a44d41389bb45d012c80.png)
Using two stacks to implement queues [two first in first out is first in first out]
![[读书摘要] 学校的英文阅读教学错在哪里?--经验主义和认知科学的PK](/img/7b/8b3619d7726fdaa58da46b0c8451a4.png)
[读书摘要] 学校的英文阅读教学错在哪里?--经验主义和认知科学的PK

炼金术(7): 何以解忧,唯有重构

Webserver flow chart -- understand the calling relationship between webserver modules

Smart wind power | Tupu software digital twin wind turbine equipment, 3D visual intelligent operation and maintenance

2022 PMP project management examination agile knowledge points (3)

什么是cookie,以及v-htm的安全性隐患

Zero foundation self-study SQL course | complete collection of date functions in SQL
![用两个栈实现队列[两次先进后出便是先进先出]](/img/de/07297816f1a44d41389bb45d012c80.png)
用两个栈实现队列[两次先进后出便是先进先出]

Zero foundation self-study SQL course | if function
随机推荐
MySQL分表查询之Merge存储引擎实现
Transmitting and receiving antenna pattern
SCU|通过深度强化学习进行微型游泳机器人的步态切换和目标导航
How to find Chinese documents corresponding to foreign documents?
[PCL self study: pclvisualizer] point cloud visualization tool pclvisualizer
免费、好用、强大的开源笔记软件综合评测
Feign implements path escape through custom annotations
积分体系和营销活动结合在一起有哪些玩法
炼金术(2): 为什么要用issue管理软件
Local visualization tool connects to redis of Alibaba cloud CentOS server
On charsequence
Chenyun pytorch learning notes_ Build RESNET with 50 lines of code
翻译(4): 文本自动完成的匹配规则
Summary of wuenda's machine learning course (11)_ Support vector machine
Pat class B 1013
Zero foundation self-study SQL course | case function
零基础自学SQL课程 | IF函数
吴恩达《机器学习》课程总结(13)_聚类
What are the ways to combine the points system with marketing activities
RecyclerView实现分组效果,多种实现方式