All projects
Door sensor: a micro:bit, two Swift apps and a hard lesson in networking
My mom tends to walk into my room unannounced, and store-bought door sensors couldn't make my Mac react. So I built my own from a spare BBC micro:bit.
An ultrasonic ranger confirms the door opening over four readings in a row. Over Bluetooth, a Mac app closes chosen tabs and an iPhone app by the bed switches to a clock.
When raw TCP sockets kept failing on the iOS 26 beta, I rebuilt the link with Apple's MultipeerConnectivity.
- BBC micro:bit
- Grove ultrasonic ranger
- MakeCode TypeScript
- Bluetooth UART
- Swift (macOS + iOS)