Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在启动期间,打开串行窗口并重置 Arduino 会触发所有输出。我需要防止这种情况发生,我连接了一个非常响亮的喇叭,当我启动机器人时它真的会吓到观众。
输出可以被阻止或设置为低吗?还是我必须用硬件做到这一点?
在复位期间,所有引脚都设置为输入。您应该能够通过将 10k 电阻接地来防止喇叭响起。
编辑:假设您的喇叭连接在输出引脚和地之间,您也可以将喇叭更改为 VCC 和输出之间。当您进行更改时,您需要更改代码以在要激活喇叭时清除该位。