I connected a speaker I ripped out of a old cellphone and connected it between pin C8 and 3.3 V. I can get sound from it by
analogWrite(C8, 0.1 , {freq : 500})
But when I try to create short sounds it's not cooperating. Should this not send the sound to the speaker in 0.1 seconds?
setTimeout(function () {analogWrite(C8, 0.1 , {freq : 500})}, 100);
What am I doing wrong?
@Hellis started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I connected a speaker I ripped out of a old cellphone and connected it between pin C8 and 3.3 V.
I can get sound from it by
But when I try to create short sounds it's not cooperating.
Should this not send the sound to the speaker in 0.1 seconds?
What am I doing wrong?