|
I am relatively new to Arduino so I know the basics however I am not the best at coding. My problem is that I am not sure about the coding for the following setup: I am using a Ultrasonic Sensor (HC-SR04) and a piezo buzzer. I want to be able to move my hand towards the sensor and away from the sensor and in doing this the buzzer will produce notes which will increase and decrease in pitch relative to my hand movement. (e.g. when my hand moves closer to the sensor the notes rise in pitch and when my hand moves away the notes decrease in pitch) I would greatly appreciate any feedback or help as I am quite stuck and it is for a college project! |