Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议增加Arduino引脚的上拉输入模式 #4

Open
sgqdafeng opened this issue Feb 1, 2021 · 0 comments
Open

建议增加Arduino引脚的上拉输入模式 #4

sgqdafeng opened this issue Feb 1, 2021 · 0 comments

Comments

@sgqdafeng
Copy link

引脚的mode没有上拉输入,外接按钮时还要串联电阻,不方便,建议增加一个PULLUP

pin = Pin(board, vpin, mode)

board: 通过pinpong类创建的板子的对象,默认板子可以省略此参数。
vpin: 板子上所用到的引脚号。(数字引脚1-Pin.D1, 模拟引脚1-Pin.A1)
mode: 定义引脚的输入、输出。Pin.IN, Pin.OUT (定义模拟量引脚时省略,默认输入)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant