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: XBeeLib mbed-rtos mbed
Capteurs/Sensors.cpp@9:68575180c7a7, 2017-12-05 (annotated)
- Committer:
- ggs22
- Date:
- Tue Dec 05 19:36:37 2017 +0000
- Revision:
- 9:68575180c7a7
- Parent:
- 3:e76f0ece91ef
- Child:
- 10:29d5ca2beffb
commit with process control
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ggs22 | 3:e76f0ece91ef | 1 | #include "Sensors.h" |
| ggs22 | 3:e76f0ece91ef | 2 | |
| ggs22 | 3:e76f0ece91ef | 3 | static Serial pc(USBTX,USBRX); |
| ggs22 | 3:e76f0ece91ef | 4 | |
| ggs22 | 3:e76f0ece91ef | 5 | void calibrateSensors(){ |
| ggs22 | 3:e76f0ece91ef | 6 | |
| ggs22 | 3:e76f0ece91ef | 7 | pc.printf("Calibrating sensors...\n"); |
| ggs22 | 3:e76f0ece91ef | 8 | |
| ggs22 | 9:68575180c7a7 | 9 | //calibrate_EC(); |
| ggs22 | 9:68575180c7a7 | 10 | //calibrate_RTD(); |
| ggs22 | 3:e76f0ece91ef | 11 | //calibrate_PH(); |
| ggs22 | 3:e76f0ece91ef | 12 | pc.printf("Calibration completed!\n"); |
| ggs22 | 3:e76f0ece91ef | 13 | } |
| ggs22 | 3:e76f0ece91ef | 14 | |
| ggs22 | 3:e76f0ece91ef | 15 | char * getReadings(){ |
| ggs22 | 3:e76f0ece91ef | 16 | |
| ggs22 | 3:e76f0ece91ef | 17 | char phBuf[DEFAULT_BUFFER_SIZE], ECBuf[DEFAULT_BUFFER_SIZE], RTDBuf[DEFAULT_BUFFER_SIZE], TxBuf[DEFAULT_BUFFER_SIZE]; |
| ggs22 | 3:e76f0ece91ef | 18 | |
| ggs22 | 3:e76f0ece91ef | 19 | read_EC(ECBuf); |
| ggs22 | 3:e76f0ece91ef | 20 | read_RTD(RTDBuf); |
| ggs22 | 3:e76f0ece91ef | 21 | read_PH(phBuf); |
| ggs22 | 3:e76f0ece91ef | 22 | |
| ggs22 | 3:e76f0ece91ef | 23 | sprintf(TxBuf,"%s;%s;%s",RTDBuf,phBuf,ECBuf); |
| ggs22 | 9:68575180c7a7 | 24 | |
| ggs22 | 9:68575180c7a7 | 25 | return TxBuf; |
| ggs22 | 3:e76f0ece91ef | 26 | } |
