FabAcademy

W:11 content

Social Distancing Outputs

>
working setup for ultrasonic sensor, servo and led

For the week on outputs I decided to work with what I had- further working with ultrasonic sensor ( the only sensor I had) but connect it to the servo I had a chance to borrow, adding extra led, for extra effect, using all the gnd available on the board ;)
reading ultrasonic sensor, the servo reacts changeing position when an object gets too close (less than 20cm) although in current world, that could be a DIY social distancing sensor, just change the range you wanna be warned has been breached I didn't encounter too many problems outside of simple misshap of leaving out initial void.setup a position of servo to 0. The code "worked" although th eservo was getting warm and "tried to move" which alerted me that somethign was wrong.

Files

  • arduino-code