开发者

Output triggered during startup/reset on Arduino

D开发者_如何学Curing startup, opening the serial window, and resetting the Arduino triggers all outputs. I need to prevent this, I have a very loud horn connected and it really will scare the audience when I startup the robot.

Can the outputs be blocked or set to low? Or do I have to do this with the hardware?


During reset all of the pins are set to inputs. You should be able to prevent the horn from sounding by adding a 10k resistor to ground.

Edit: Assuming your horn is connected between an output pin and ground, you might also be able to change the horn to be between VCC and the output. When you make that change you will need to change the code to clear the bit when you want to activate the horn.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜