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
- Committer:
- jphilip
- Date:
- 2017-12-04
- Revision:
- 7:46889f2aa444
- Parent:
- 6:b4f0687c4d14
- Child:
- 8:62898720a01d
File content as of revision 7:46889f2aa444:
#include "Sensors.h"
#include "xbeeutils.h"
static Serial pc(USBTX,USBRX);
void calibrateSensors(){
pc.printf("Calibrating sensors...\n");
calibrate_EC();
calibrate_RTD();
//calibrate_PH();
pc.printf("Calibration completed!\n");
}
void getReadings(){
char phBuf[DEFAULT_BUFFER_SIZE], ECBuf[DEFAULT_BUFFER_SIZE], RTDBuf[DEFAULT_BUFFER_SIZE], TxBuf[DEFAULT_BUFFER_SIZE];
read_EC(ECBuf);
read_RTD(RTDBuf);
read_PH(phBuf);
//sprintf(TxBuf,"%s;%s;%s",RTDBuf+1,phBuf+1,ECBuf+1);
sprintf(TxBuf,"%s;%s;%s","1.1","2.2","3.3");
pc.printf("%s\n",TxBuf);
xbee_broadcast(TxBuf,strlen(TxBuf)+1);
pc.printf("TxBuf strlen: %i\n",strlen(TxBuf));
}
