Intro&Tools :

by alisaliang in Living > Life Hacks

124 Views, 0 Favorites, 0 Comments

Intro&Tools :

Arduino 期末
9189.jpg

This project is using tone() with Arduino to make noise in an easy way.

You will need:

8 wires

1 piezo speaker

1 supersonic sensor

1 breadboard

BE CAREFUL WHEN YOU ARE USING THE PIEZO SPEAKER, IT IS FRAGILE!!!!!!!!!!!!!!

Code

螢幕快照 2019-12-18 上午12.30.56.png
IMG20191217231719.jpg
IMG20191217231813.jpg

Try It!

9186.jpg

connect the breadboard to your computer

you can try to get close to the supersonic sensor, it will make some noise when you get to a specific distance