![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
d
Dependencies: mbed DS1621 4dGENIE
main.cpp
- Committer:
- __joss__
- Date:
- 2021-02-16
- Revision:
- 0:c8f90c6586ea
File content as of revision 0:c8f90c6586ea:
#include "mbed.h" #include "ds1621.h" #define DS1621_ADDR 0x90 Serial pc(USBTX, USBRX); I2C i2c_ds(p28, p27); DS1621 ds(&i2c_ds, DS1621_ADDR); float temp, Htemp; int main() { ds.StartConversion(1); //ds.SetConfig(0x01); //1shot ds.SetConfig(0x00); //polarity while(1) { ds.GetTemp(READ_TEMPERATURE, &temp); pc.printf("%f \n\r", temp); wait(1.0); pc.printf("\n\r"); } }