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: MAX30205 max32630hsp3
Run the Code
- Import it into the mbed online compiler.
- Compile the program.
- It will automatically download the .bin file.
- Drag-drop or copy-paste the .bin file to the programmer drive. (PICO DAPLINK).
- Open a serial terminal (Putty, Tera Term, etc.)
- Find the COM port that the device is connected to and set that COM port in the terminal. Adjust the baudrate to 9600.
- Press the reset button on the microcontroller board.
- You should now see the temperature values on the terminal with 0.5-second intervals.
Diff: main.cpp
- Revision:
- 0:5ff3e9115682
- Child:
- 2:88d3b848b5a4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Apr 19 17:28:32 2018 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "MAX30205.h"
+#include "max32630hsp.h"
+
+//PC serial connection:
+Serial pc(USBRX,USBTX);
+
+//Enable pin to convert 3V3 to 3V for MAX30205:
+DigitalOut max30205_LDO_EN(P7_1,1);
+
+//Board Initializations: (This also initializes PMIC)
+MAX32630HSP icarus(MAX32630HSP::VIO_3V3);
+
+//Get I2C instance
+I2C i2cBus(P3_4, P3_5);
+
+//Get temp sensor instance
+MAX30205 bodyTempSensor(i2cBus, (0x90 >> 1));
+
+int main(void)
+{
+ //use sensor
+ uint16_t TemperatureValue;
+ uint32_t ExpandTemperatureValue=0;
+ float Celsius;
+
+ while(1)
+ {
+ if(!bodyTempSensor.readTemperature(TemperatureValue))
+ {
+ ExpandTemperatureValue = (uint32_t)TemperatureValue;
+ Celsius = bodyTempSensor.toCelsius(ExpandTemperatureValue);
+ pc.printf("The temperature is %f Celsius\r\n",Celsius);
+ }
+ wait(0.5);
+ }
+}
Health Sensor Board Embedded Heart Rate Algorithm Sensor Hub + ECG, Wearables Ev Kit MAXREFDES101#