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.
Fork of Hexi_Accelero_Magneto_Example by
Diff: main.cpp
- Revision:
- 5:2e1700fc3386
- Parent:
- 4:acdc72fe9dcf
--- a/main.cpp Tue Aug 30 22:13:42 2016 +0000
+++ b/main.cpp Sun Sep 04 22:41:32 2016 +0000
@@ -1,21 +1,16 @@
#include "mbed.h"
-#include "MAX20101.h"
+#include "MAX30101.h"
-// Check out the full featured example application for interfacing to the
-// Accelerometer/Magnetometer device at the following URL
-// https://developer.mbed.org/users/trm/code/fxos8700cq_example/
-DigitalOut led1(LED_GREEN);
+DigitalOut led1(LED_BLUE);
-// Initialize Serial port
-Serial pc(USBTX, USBRX);
+Serial pc(USBTX, USBRX);// Initialize Serial port
-// Pin connections & address for Hexiwear
MAX30101 heart(PTB1, PTB0);
int main() {
- printf("MAX301010 sensor test....\r\n\r\n");
+ pc.printf("MAX301010 sensor test....\r\n\r\n");
wait(0.5);
heart.enable();
@@ -23,7 +18,7 @@
while (1) {
led1 = !led1;
// Example data printing
- printf("ID 0x%02x\r\n", heart.getRevisionID());
+ pc.printf("ID 0x%02x\r\n", heart.getRevisionID());
Thread::wait(500);
}
