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.
Dependents: Condensation_Monitor mbed_HDC1000 BLE_Condensation_Monitor GR-PEACH_TAMORI
HDC1000.h
00001 //********************** 00002 // HDC1000.h for mbed 00003 // 00004 // (C)Copyright 2015 All rights reserved by Y.Onodera 00005 // http://einstlab.web.fc2.com 00006 //********************** 00007 #ifndef HDC1000_H_ 00008 #define HDC1000_H_ 00009 00010 #define HDC1000_ADDR 0x80 00011 #define HDC1000_TEMP 0x00 00012 #define HDC1000_HUM 0x01 00013 #define HDC1000_CONFIG 0x02 00014 #define HDC1000_SERIAL0 0xFB 00015 #define HDC1000_SERIAL1 0xFC 00016 #define HDC1000_SERIAL2 0xFD 00017 #define HDC1000_MAMUFUCTUREER 0xFE 00018 #define HDC1000_DEVICE 0xFF 00019 00020 #include "mbed.h" 00021 #include "typedef.h" 00022 00023 class HDC1000{ 00024 public: 00025 HDC1000 (PinName sda, PinName scl); 00026 HDC1000 (I2C& p_i2c); 00027 00028 void get(); 00029 unsigned short humidity(); 00030 unsigned short temperature(); 00031 void init(); 00032 00033 protected: 00034 00035 I2C _i2c; 00036 00037 WORD_VAL hum; 00038 WORD_VAL temp; 00039 char buf[8]; 00040 00041 }; 00042 00043 #endif /* HDC1000_H_ */ 00044 00045
Generated on Sat Jul 16 2022 01:32:43 by
1.7.2