- Open App → New App.
- Tap + Add Widget and choose Switch.
- Tap the Switch: in its code you see on → send "S" and off → send "s".
- Put the board code below on your TinkerPy board.
- Tap Run, then Connect → Bluetooth, and flip your switch!
This is the board side — it listens for S and s:
Board code
Put this on your TinkerPy board with TinkerPy Projects:
import bluetooth setup: bluetooth_begin() # switches Bluetooth on when the board starts loop: bt = bluetooth_read_char() if bt == 'S': o1 = pwm(100) elif bt == 's': o1 = 0