Week 3 of this project involved the testing and implementation of an ultrasonic range-finding sensor into our design for an interactive lighting system.
The sensor in question is a parallax ultrasonic ping sensor (#28015), which emits an inaudible longitudinal wave towards an object and measures the distance between it and said object by measuring the time taken for the wave to deflect back to the receiver.
After learning about the basic coding of the sensor via it’s sample code, the component was combined with the LED fading sketch from week 2 to activate the LED within a range of 20cm from an object and then fade up to maximum brightness at 0cm (and vice versa when moving the object away). As we wanted to incorporate a more hands-on experience with our project, we set the sensors maximum range to within close proximity of the user’s hand.
After conducting the test, we are now able to expand this to multiple LEDs instead of just 1 and to use RGBs so that the colours can be altered during fading (new concepts below). Hence we were able to resolve our product more than in previous weeks.