# Reading the toggle switch

```python
#!/usr/bin/env python3
import time
import synergy_logic
from slm_rp4_helpers import read_switch_state

base = synergy_logic.Base()
output = base[1][1]

while True:
    output.value = read_switch_state()
    time.sleep(0.05)
```

See [Onboard Peripherals](../../onboard-peripherals.md) for the full switch and LED API.
