Motivation:
During the pandemic. I realised that a light switch was a hotspot for touches and a breeding ground for covid-19. This made me wonder if there was a way to reduce this interaction and hence reduce risk of contamination.
This thought and access to an Arduino and sensors spawned my first project.
Skills
- Arduino IDE/C++
- Hardware/Software integration
- Problem Solving
Process
In this project, I created an ultrasonic sensor light switch which would switch an led on and off by placing your hand within 30cm of the sensor for more than 5 seconds. Extra functionality to randomly change the colour was completed by waving your hand across the sensor

Project Outcome
Challenges
The challenge I faced was being able to program the sensor to communicate how long my hand has been within 30cm and
use that to create different results for my hand movements. Initially, I was only able to trigger the lights if it was engaged for
5 seconds or more. This is was fixed by using a ‘while’ loop to record the elapsed time my hand is close to the sensor both
before and after and use the difference within the code to provide the functionality to allow the colour to be changed if you
‘swipe’ your hand over the sensor in the right way.
Next Steps:
The next step in the project is to control the lights from anywhere in the
house using Google assistant.