Pulsweitenmodulation - Generieren eines x Hz Tones mittels PWM

Dependencies:   mbed

Fork of PwmOut by smd.iotkit.ch

Files at this revision

API Documentation at this revision

Comitter:
stefan1691
Date:
Sun Sep 06 15:24:01 2015 +0000
Parent:
2:531fd60e2e47
Commit message:
Summer lauter gestellt

Changed in this revision

.hgignore Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 531fd60e2e47 -r f40b90476234 .hgignore
--- a/.hgignore	Sun Aug 16 19:39:04 2015 +0200
+++ b/.hgignore	Sun Sep 06 15:24:01 2015 +0000
@@ -1,3 +1,19 @@
-
 syntax: regexp
-^MCU_K64F$
\ No newline at end of file
+\.hgignore$
+\.git$
+\.svn$
+\.orig$
+\.msub$
+\.meta$
+\.ctags
+\.uvproj$
+\.uvopt$
+\.project$
+\.cproject$
+\.launch$
+\.project$
+\.cproject$
+\.launch$
+Makefile$
+\.ewp$
+\.eww$
\ No newline at end of file
diff -r 531fd60e2e47 -r f40b90476234 main.cpp
--- a/main.cpp	Sun Aug 16 19:39:04 2015 +0200
+++ b/main.cpp	Sun Sep 06 15:24:01 2015 +0000
@@ -9,10 +9,10 @@
     while   ( 1 ) 
     {
         // Polizei Sirene
-        speaker.period( 1.0 / 969.0 );      // 969 = Tonfrequenz in Hz
+        speaker.period( 1.0 / 3969.0 );      // 3969 = Tonfrequenz in Hz
         speaker = 0.5f;
         wait( 0.5f );
-        speaker.period( 1.0 / 800.0 );
+        speaker.period( 1.0 / 2800.0 );
         wait( 0.5f );
     }
 }
\ No newline at end of file