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: CCS811
Fork of MtConnect04S_MtSense02 by
Revision 2:f3768a226561, committed 2018-04-27
- Comitter:
- johnathanlyu
- Date:
- Fri Apr 27 09:52:19 2018 +0000
- Parent:
- 1:522ccb1e6b41
- Commit message:
- add 52 support
Changed in this revision
--- a/CCS811.lib Tue Jun 27 07:32:43 2017 +0000 +++ b/CCS811.lib Fri Apr 27 09:52:19 2018 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/MtM/code/CCS811/#b5dbfc21185d +https://developer.mbed.org/teams/MtM/code/CCS811/#57eb62ded32d
--- a/mbed-os.lib Tue Jun 27 07:32:43 2017 +0000 +++ b/mbed-os.lib Fri Apr 27 09:52:19 2018 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#3179b1cffddea0f0feed1dd551b0e7dc946c12f5 +https://github.com/ARMmbed/mbed-os/#16bac101a6b7b4724023dcf86ece1548e3a23cbf
--- a/source/main.cpp Tue Jun 27 07:32:43 2017 +0000
+++ b/source/main.cpp Fri Apr 27 09:52:19 2018 +0000
@@ -22,15 +22,20 @@
#include "AirQualityService.h"
//initial function pin
+#ifdef NRF52
+Serial pc(p20, p24);
+#else
Serial pc(p5, p4);
+#endif
+
I2C i2c(p3, p2);
DigitalOut ledR(p16, 1);
-CCS811 ccs811(i2c);
+CCS811 ccs811(i2c, pc);
static AirQualityService *AQSPtr;
static uint16_t eco2, tvoc;
-const static char DEVICE_NAME[] = "MtConnect04sMtSense02";
+const static char DEVICE_NAME[] = "Mt5MtSense02";
static const uint16_t uuid16_list[] = {GattService::UUID_BATTERY_SERVICE};
@@ -143,11 +148,10 @@
pc.printf("Welcome MTM Node !\r\n");
eventQueue.call_every(500, blinkCallback);
-
-
+
ccs811.init();
// ccs811.softRest();
- eventQueue.call_every(1000, CCS811Callback);
+ eventQueue.call_every(2000, CCS811Callback);
BLE &ble = BLE::Instance();
ble.onEventsToProcess(scheduleBleEventsProcessing);
