# Switch

## {{@218#bkmrk-open-iot-and-iiot-ga}}


Link to repositories:

- [C](https://github.com/Redisage/PAC-ESP32/tree/master/C_examples/switch)
- [MicroPython](https://github.com/Redisage/ESP32_Open_IoT_and_IIoT_Gateways_examples/tree/master/uPython_examples/switch)

### Description

This example shows how to use the button located on the board. There is a simple interrupt handler implemented with a queue used to send a parameter from the handler to a main loop. The board should react on every button press or release with a communicate on the console log.

### Console output

[![image.png](https://doc.redisage.com/uploads/images/gallery/2024-06/scaled-1680-/Cseimage.png)](https://doc.redisage.com/uploads/images/gallery/2024-06/Cseimage.png)