Tomislav Šoić / beep

Fork of beep by Peter Drescher

Files at this revision

API Documentation at this revision

Comitter:
tsoic
Date:
Tue Feb 10 12:35:05 2015 +0000
Parent:
4:d8e14429a95f
Commit message:
added piezo speaker and sound effects

Changed in this revision

beep.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/beep.cpp	Tue Sep 11 08:21:45 2012 +0000
+++ b/beep.cpp	Tue Feb 10 12:35:05 2015 +0000
@@ -47,7 +47,7 @@
 void Beep::beep(float freq, float time) {
 
     _pwm.period(1.0/freq);
-    _pwm.write(0.5);            // 50% duty cycle - beep on
+    _pwm.write(0.2);            // 50% duty cycle - beep on
     toff.attach(this,&Beep::nobeep, time);   // time to off
 }