
156 Make: Radio
14 declares all the button pins as inputs and enables the internal pullup
resistors. That means these pins will read as high until the buttons pull them
low by connecting them to negative ground. The loop function reads every
pin, and as soon as it finds a pin with a low value, meaning that the button is
pressed, it transmits the corresponding code using the function tx.send().
The function needs two parameters: the actual code to send and the number
of bits it contains. (Twenty-four bits is a common number for remote
controls. You probably don’t need to change that unless you want to match
an existing remote control.)
RECEIVER ...