Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P
Microphone.cpp@2:dc046ff72566, 2018-04-18 (annotated)
- Committer:
- Nurchu
- Date:
- Wed Apr 18 14:40:57 2018 +0000
- Revision:
- 2:dc046ff72566
- Child:
- 6:7c72902a735f
Split Microphone into it's own file
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Nurchu | 2:dc046ff72566 | 1 | #include "Microphone.h" |
Nurchu | 2:dc046ff72566 | 2 | |
Nurchu | 2:dc046ff72566 | 3 | microphone::microphone (PinName pin): |
Nurchu | 2:dc046ff72566 | 4 | _pin(pin) |
Nurchu | 2:dc046ff72566 | 5 | {} |
Nurchu | 2:dc046ff72566 | 6 | |
Nurchu | 2:dc046ff72566 | 7 | float microphone::read() |
Nurchu | 2:dc046ff72566 | 8 | { |
Nurchu | 2:dc046ff72566 | 9 | return _pin.read(); |
Nurchu | 2:dc046ff72566 | 10 | } |
Nurchu | 2:dc046ff72566 | 11 | |
Nurchu | 2:dc046ff72566 | 12 | inline microphone::operator float () |
Nurchu | 2:dc046ff72566 | 13 | { |
Nurchu | 2:dc046ff72566 | 14 | return _pin.read(); |
Nurchu | 2:dc046ff72566 | 15 | } |