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.
TPA81new.h
00001 #ifndef MY_TPA_H 00002 #define MY_TPA_H 00003 #define TPA_addr_x 0xD2 00004 #define TPA_addr_y 0xD0 00005 #include "mbed.h" 00006 00007 class TPA81{ 00008 public: 00009 TPA81(PinName mysda, PinName myscl, char TPA_addr); 00010 void setAddress(char inAddr); 00011 int getTempAt(); 00012 int getTemp(short i); 00013 void changeaddress(char x, char y); 00014 // Untuk Lomba 00015 int Data[8]; 00016 void Read(); 00017 unsigned char IsAdaApi(); 00018 unsigned int TingkatPanas(); 00019 unsigned int Ambient(); 00020 00021 protected: 00022 int _aTemp; 00023 int _temp[8]; 00024 I2C _TPA; 00025 char _addr; 00026 char _cmd[2]; 00027 float _delay; 00028 }; 00029 00030 #endif 00031
Generated on Sat Jul 23 2022 07:12:26 by
1.7.2