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
main.cpp
00001 #include "mbed.h" 00002 #include "MAX30205.h" 00003 #include "max32630hsp.h" 00004 00005 //PC serial connection: 00006 Serial pc(USBTX,USBRX); 00007 00008 //Enable pin to convert 3V3 to 3V for MAX30205: 00009 DigitalOut max30205_LDO_EN(P7_1,1); 00010 00011 //Board Initializations: (This also initializes PMIC) 00012 MAX32630HSP icarus(MAX32630HSP::VIO_3V3); 00013 00014 //Get I2C instance 00015 I2C i2cBus(I2C1_SDA, I2C1_SCL); 00016 00017 //Get temp sensor instance 00018 MAX30205 bodyTempSensor(i2cBus, (0x90 >> 1)); 00019 00020 int main(void) 00021 { 00022 //use sensor 00023 uint16_t TemperatureValue; 00024 uint32_t ExpandTemperatureValue=0; 00025 float Celsius; 00026 00027 while(1) 00028 { 00029 if(!bodyTempSensor.readTemperature(TemperatureValue)) 00030 { 00031 ExpandTemperatureValue = (uint32_t)TemperatureValue; 00032 Celsius = bodyTempSensor.toCelsius(ExpandTemperatureValue); 00033 pc.printf("The temperature is %f Celsius\r\n",Celsius); 00034 } 00035 wait(0.5); 00036 } 00037 }
Generated on Sat Jul 16 2022 02:22:32 by
1.7.2
Health Sensor Board Embedded Heart Rate Algorithm Sensor Hub + ECG, Wearables Ev Kit MAXREFDES101#