The KISS LoRa board has a rotary switch with 10 different positions, marked 0 to 9. This example constantly polls the switch and prints out the position of the switch.
The rotary switch outputs the value that is selected in binary format, using 4 digital lines. If these 4 digital lines are read and interpreted in the correct order, the value can be calculated.