![]() We will use the Arduino pin in INPUT mode. The LED will always only light up when the switch is toggled on. These are a bit different and do not allow control over the LED independent from the switch position. We will use the Arduino pin in normal OUTPUT mode. For the LED, you attach additional wires: When you push the button or toggle the switch, the circuit gets closed and the pin gets grounded. The NO connector on the switch or button is Normally Open, so the circuit is not connected. We will configure the digital pin as INPUT_PULLUP, which means the Arduino will keep the pin at 5V and detect when the pin gets grounded and treat that as an input.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |