2

起動時にシリアル ウィンドウを開き、Arduino をリセットすると、すべての出力がトリガーされます。これを防ぐ必要があります。非常に大きなホーンが接続されているため、ロボットを起動すると聴衆を本当に怖がらせてしまいます。

出力をブロックまたはローに設定できますか? それとも、ハードウェアでこれを行う必要がありますか?

4

1 に答える 1

0

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.

于 2011-09-09T12:02:25.227 に答える