blah

Committer:
hisyamfs
Date:
Sun Dec 16 01:52:53 2018 +0000
Revision:
0:90ed652031fd
test board v1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hisyamfs 0:90ed652031fd 1 #ifndef MY_TPA_H
hisyamfs 0:90ed652031fd 2 #define MY_TPA_H
hisyamfs 0:90ed652031fd 3 #define TPA_addr_x 0xD2
hisyamfs 0:90ed652031fd 4 #define TPA_addr_y 0xD0
hisyamfs 0:90ed652031fd 5 #include "mbed.h"
hisyamfs 0:90ed652031fd 6
hisyamfs 0:90ed652031fd 7 class TPA81{
hisyamfs 0:90ed652031fd 8 public:
hisyamfs 0:90ed652031fd 9 TPA81(PinName mysda, PinName myscl, char TPA_addr);
hisyamfs 0:90ed652031fd 10 void setAddress(char inAddr);
hisyamfs 0:90ed652031fd 11 int getTempAt();
hisyamfs 0:90ed652031fd 12 int getTemp(short i);
hisyamfs 0:90ed652031fd 13 void changeaddress(char x, char y);
hisyamfs 0:90ed652031fd 14 // Untuk Lomba
hisyamfs 0:90ed652031fd 15 int Data[8];
hisyamfs 0:90ed652031fd 16 void Read();
hisyamfs 0:90ed652031fd 17 unsigned char IsAdaApi();
hisyamfs 0:90ed652031fd 18 unsigned int TingkatPanas();
hisyamfs 0:90ed652031fd 19 unsigned int Ambient();
hisyamfs 0:90ed652031fd 20
hisyamfs 0:90ed652031fd 21 protected:
hisyamfs 0:90ed652031fd 22 int _aTemp;
hisyamfs 0:90ed652031fd 23 int _temp[8];
hisyamfs 0:90ed652031fd 24 I2C _TPA;
hisyamfs 0:90ed652031fd 25 char _addr;
hisyamfs 0:90ed652031fd 26 char _cmd[2];
hisyamfs 0:90ed652031fd 27 float _delay;
hisyamfs 0:90ed652031fd 28 };
hisyamfs 0:90ed652031fd 29
hisyamfs 0:90ed652031fd 30 #endif
hisyamfs 0:90ed652031fd 31