WEEK 9 ASSIGNMENT

CONCEPT:

For this assignment, I created an object detector using my shoes as the trigger by using the ultrasonic sensor for detection. When my shoes are within a specific range (within 20 cm), the red LED lights up, indicating that the object is close. As for the switch, it’s really simple,—an off and on switch to turn on the blue LED.

The area I’m most proud of:

Setting up the ultrasonic sensor to accurately detect when my shoes were within range wasn’t hard after all, but I didn’t realize I had to set like an accurate range because at first I set it high and it wouldn’t detect the objects accurately; it would just light up. I thought there was an error in the code or the wiring itself, but when I changed the threshold to a small number, meaning the objects had to be closer, it was more accurate. So the light lit up when my shoes were in the right spot.

Reflection:

Honestly, I received a lot of help from Amna, as at first I tried using the LDR, but I couldn’t get it right even watching YouTube videos. I still didn’t figure out where I went wrong, so hopefully I get to understand that more. Hence why I changed and used the Ultrasonic; as Amna understood it, she explained it to me, and I gave it my own twist.

 

https://github.com/nouraalhosani/Intro-to-IM/blob/c4c8dde35515a6d5f9771a0c6b308841baaeb59b/Sensor.ino

The video: (I forgot to record the switch but I promise it works!)

set up

 

Leave a Reply