6.6. Sobald kein magnetisches Feld mehr vorhanden, Akustisches Signal auslösen.

Files at this revision

API Documentation at this revision

Comitter:
marcel1691
Date:
Fri Feb 01 10:14:53 2019 +0000
Parent:
0:76692683baea
Commit message:
Update mbed os 5.11

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
diff -r 76692683baea -r 4df8cc0c6b73 main.cpp
--- a/main.cpp	Sun Apr 26 13:40:01 2015 +0000
+++ b/main.cpp	Fri Feb 01 10:14:53 2019 +0000
@@ -3,15 +3,15 @@
 #include "mbed.h"
 
 // Hall Sensor
-AnalogIn hallSensor( A2 );
+AnalogIn hallSensor( A3 );
 // Summer (Buzzer)
-PwmOut speaker( D7 );
+PwmOut speaker( D3 );
 
 int main()
 {
     while(1) 
     {
-        if  ( hallSensor.read() > 0.1f ) 
+        if  ( hallSensor.read() > 0.6f ) 
         {
             // Polizei Sirene
             speaker.period( 1.0 / 969.0 );      // 969 = Tonfrequenz in Hz
diff -r 76692683baea -r 4df8cc0c6b73 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Fri Feb 01 10:14:53 2019 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#50bd61a4a72332baa6b1bac6caccb44dc5423309
diff -r 76692683baea -r 4df8cc0c6b73 mbed.bld
--- a/mbed.bld	Sun Apr 26 13:40:01 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file