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.
test_MAX30205.cpp
00001 #include "mbed.h" 00002 #include "MSS.h" 00003 #include "MAX30205.h" 00004 00005 #define MAX30205_I2C_ADDRESS 0x48 00006 00007 int main() { 00008 uint16_t temp, thyst, tos ; 00009 MAX30205 *max30205 = new MAX30205(PIN_SDA, PIN_SCL, MAX30205_I2C_ADDRESS) ; 00010 00011 printf("=== test MAX30205 for %s (%s) ===\n", BOARD_NAME, __DATE__) ; 00012 printf("Temp, Thyst, Tos\n") ; 00013 temp = max30205->getTemp() ; 00014 thyst = max30205->getThyst() ; 00015 tos = max30205->getTos() ; 00016 printf("%4.3f, %4.3f, %4.3f\n", 00017 (float)temp/256.0, (float)thyst/256.0, (float)tos/256.0) ; 00018 printf("Temperature (C degree)\n") ; 00019 while(1) { 00020 temp = max30205->getTemp() ; 00021 printf("%4.3f\n",(float)(temp)/256.0) ; 00022 wait(1) ; 00023 } 00024 }
Generated on Sun Jul 17 2022 00:33:52 by
1.7.2