#arduino, #arduino, #atmega_in_C++
Arduino programming lesson (ATmega microcontroller) - sketch for controlling a touch button and LED (relay).
Due to the lack of a tact switch, I used a touch switch (touch switches don't bounce). The debounce implementation works perfectly (this method was used in a device with tact switches, which had bounce, which prompted me to make a subsequent video on debounce), and a program written in C++.
Two examples:
Arduino pushbutton with latching (toggle)
Arduino pushbutton without latching
The button function implements software debounce without delay.
You can download an example sketch from the VKontakte group: https://vk.com/arduinomarket?w=wall-1...