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
Diff: Microphone.cpp
- Revision:
- 7:0ac1f1ca8aa6
- Parent:
- 6:7c72902a735f
- Child:
- 8:0222df74596e
diff -r 7c72902a735f -r 0ac1f1ca8aa6 Microphone.cpp --- a/Microphone.cpp Wed Apr 18 15:00:46 2018 +0000 +++ b/Microphone.cpp Wed Apr 18 15:09:32 2018 +0000 @@ -1,4 +1,5 @@ #include "Microphone.h" +#define UINT8_MAX 255 Microphone::Microphone (PinName pin): _pin(pin) @@ -16,5 +17,6 @@ uint8_t Microphone::getData() { - return 0; + // This can be better but this should work for now + return (mymicrophone - (0.67/3.3)) * UINT8_MAX; } \ No newline at end of file