The code was relatively easy to understand and I got it from adafruit.
One of the major problems I face is the sensitivity of the sensor. It took me 5 hours just to get it to work. I didn’t know that I should let to ‘rest’ for 30 seconds to 1 minute before trying to trigger it. After testing to for A VERY LONG TIME then I realised this ‘feature’ after I go on to Youtube to find out the problem. The sensor is now working but it has a lag time of 2-3 seconds even though I adjusted the delay to 0.3 seconds. So basically, if I put my hand there, the led will turn on only 2-3 seconds later and when I take my hand away, the led will turn off 2-3 seconds later (again!).
This circuit was relatively easy, but the setting for the adjustments for the sensitivity and the delay time was a steep learning curve when trying to configure.
For the ear muff frame, I decided to add some mechanisms to lift the cover of the ear muffs(not done yet) instead of just a thick ear muff.
For my next goal, I will try to make the mechanisms (linkage system) for the ear muff as well as the lifting of the cover for the muffs. For the technical side, I will try to get the sensor working with 4 motors.