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.h@20:e068469ffb89, 2018-04-20 (annotated)
- Committer:
- Nurchu
- Date:
- Fri Apr 20 18:39:20 2018 +0000
- Revision:
- 20:e068469ffb89
- Parent:
- 8:0222df74596e
- Child:
- 33:5d86c111d9bc
Cleaned up some comments/code; Compiles now
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Nurchu | 2:dc046ff72566 | 1 | #include "mbed.h" |
Nurchu | 2:dc046ff72566 | 2 | |
Nurchu | 2:dc046ff72566 | 3 | class Microphone |
Nurchu | 2:dc046ff72566 | 4 | { |
Nurchu | 6:7c72902a735f | 5 | public: |
Nurchu | 8:0222df74596e | 6 | Microphone(PinName pin); |
Nurchu | 6:7c72902a735f | 7 | |
Nurchu | 20:e068469ffb89 | 8 | // Returns the raw float value on the pin |
Nurchu | 2:dc046ff72566 | 9 | float read(); |
Nurchu | 2:dc046ff72566 | 10 | operator float (); |
Nurchu | 20:e068469ffb89 | 11 | |
Nurchu | 20:e068469ffb89 | 12 | // Returns a scaled uint8 for transmission over the RF channel |
Nurchu | 6:7c72902a735f | 13 | uint8_t getData(); |
Nurchu | 6:7c72902a735f | 14 | |
Nurchu | 6:7c72902a735f | 15 | private: |
Nurchu | 2:dc046ff72566 | 16 | AnalogIn _pin; |
Nurchu | 2:dc046ff72566 | 17 | }; |