From fa1628c7aa98a7d4900cad870f6aa1d4c0bda197 Mon Sep 17 00:00:00 2001 From: El Jeffo Date: Sun, 27 Sep 2015 22:33:27 +0900 Subject: [PATCH] Update frequency base to output more accurate tones --- wiringPi/wiringPi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index 7e1c3a2..0f6ed22 100755 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -2319,7 +2319,7 @@ void pwmToneWrite (int pin, int freq) pwmWrite (pin, 0) ; // Off else { - range = 600000 / freq ; + range = 200000 / freq ; pwmSetRange (range) ; pwmWrite (pin, range / 2) ; }