smd.iotkit.ch
/
0-06-06-Uebung
6.6. Sobald kein magnetisches Feld mehr vorhanden, Akustisches Signal auslösen.
Revision 1:4df8cc0c6b73, committed 2019-02-01
- 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
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