Hi,
Previously on my Arduino, I use these codes below to play tone. The piezo speaker positive pin is connected to pin 10. While the negative pin is connected to pin 9.
#include <toneAC.h> int frequency = 10000; //19000 void playFrequency() { toneAC(frequency); } void setup() { } void loop() { playFrequency(); }
I am trying to achieve the same thing on the Galelio. However, above codes cannot be executed because ToneAC library is not supported by the Galileo. So, I thought the normal tone would work
void setup() { } void loop() { tone(8, 1000); }
Well, sadly, it does not work too. I did a little googling and came across this link.
So, it seems that tone() function does not exist. As such, how can I play the piezo speaker with the Galileo?
The main reason I used ToneAC on my Arduino previously is because the tone is much smoother at higher frequency as I wanted it to generate tones between 19kHz - 22kHz.
Kindly advice me on how do I achieve the same thing with the Galileo?
*I accidently marked this as answered*
Thank you in advance.