image.png

The Speaker is connected to pin D8 on the Arduino. It will play at 440Hz for 1000ms(1s).

WeChat_20240921165205.mp4

It is working.

Then I changed to frequency to 800Hz to see the difference:

Change to 800Hz.mp4

FSR Controlled Speaker

First I measured the FSR sensor range on my circuit.

sensorRange.mp4

It turns out to be between 0-850, so I am going to write down 0-800 under map()

Here is the code to run it.

image.png