
Switches are hard to reach for elderly people and people with limited mobility, and smart-home kits are expensive and need an app for everything. We wanted to switch ordinary appliances with nothing but a webcam and a hand.
Webcam, then MediaPipe Hands, then the gesture classifier, then a serial command, then the Arduino, then a relay.
The Hackster tutorial we started from counts raised fingers, which only gives a handful of states and misfires easily. We switched to a pre-trained 10-class landmark model, which gave a distinct gesture per on and off action but meant the model's landmark scaling had to be kept exactly as it expects.
The Arduino reads whole lines, so every command is a newline-terminated word that is trimmed and matched. The PIR reading is printed on the same port every loop, so replies and sensor values interleave on the wire.
The relay and buzzer modules are active-LOW, so LOW means on. The channel order on the board is reversed against the pin order, and the early sketch let relays click on at boot until the outputs were written off before pinMode.
Placed in the top 25 of 300+ teams at SAP's Code Unnati Innovation Marathon 2.0. The code, sketch and wiring are now public.
