Buttons!

CodeBug’s legs are can also detect electric currents. In this mode they are called inputs.

How buttons work

Buttons work by controlling whether two contacts are connected or not. When the button is pushed the two sides are connected and electricity can flow. In the off state (not-pressed) no electricity will flow.

The button diagram above shows how the buttons legs are connected. The two legs on the left are always connected together, and the two legs on the right are always connected together. While you press the button, the left side and the right side are connected.


Activities with this step

Back to top