Proximity Hat

Are you prone to hitting your head, like me.
Even though I am below the average height I still hit my head a lot, especially when working on projects by leaning forward or lifting up and hitting my head.
Because of this I decided to make a hat with a proximity sensor and alarm in it.
I used some of the codes and settings from this other ultrasonic sensor instructable. https://www.instructables.com/id/UltraSonic-Proxim…
Then added the code for an LED and modified it to fit in a hat.”

Link