Dust sensor
Fork of DustSenzor by
Revision 10:d846eb9ef8e6, committed 2017-06-28
- Comitter:
- mpuric
- Date:
- Wed Jun 28 18:35:18 2017 +0000
- Parent:
- 9:93fe9ccde2a9
- Commit message:
- added api doc
Changed in this revision
DustSenzor.cpp | Show annotated file Show diff for this revision Revisions of this file |
DustSenzor.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 93fe9ccde2a9 -r d846eb9ef8e6 DustSenzor.cpp --- a/DustSenzor.cpp Thu Jun 15 15:38:32 2017 +0000 +++ b/DustSenzor.cpp Wed Jun 28 18:35:18 2017 +0000 @@ -2,7 +2,6 @@ #include "DustSenzor.h" - DustSenzor :: DustSenzor ( PinName set, PinName uartTx, PinName uartRx ) : set( set ), uart( uartTx, uartRx ) { this -> set = 0; uart.baud(9600);
diff -r 93fe9ccde2a9 -r d846eb9ef8e6 DustSenzor.h --- a/DustSenzor.h Thu Jun 15 15:38:32 2017 +0000 +++ b/DustSenzor.h Wed Jun 28 18:35:18 2017 +0000 @@ -2,8 +2,8 @@ #define DUSTSENZOR_H #include"mbed.h" -/** Simple class for reading values from Plantower PMS5003 dust concentration sensor. - + /** Simple class for reading values from Plantower PMS5003 dust concentration sensor. + * * Example: * @code: * #include "mbed.h" @@ -12,21 +12,25 @@ * DustSenzor ds(p5, p9, p10); * float values [6]; * float *ptr; - + * * int main() { * ds.start(); * ptr = ds.read(); - + * * for( int i = 0; i < 6; i++) { * values [i] = *(ptr + i); * } * } * @endcode -*/ - + */ class DustSenzor { public: + /** Create DustSenzor instance. + * @param set Sensor set pin. + * @param uartTx Sensor Tx pin. + * @param uartRx Sensor Rx pin. + */ DustSenzor ( PinName set, PinName uartTx, PinName uartRx ); /** Start the communication with sensor. @@ -38,7 +42,7 @@ void stop(); /** Read the values from a float array with 6 elements. - *Function is returnig a pointer to the first element of array. + * Function is returnig a pointer to the first element of array. */ float* read();