EasyManua.ls Logo

FLIR ADK - Page 18

FLIR ADK
27 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FLIR ADK
Getting Sta rt e d
The information contained herein does not contain technology as
defined by EAR,15 CFR772, is publicly available, and therefore
not subject to EAR.
18
}
byte i2cread(byte addy, byte reg)
{
byte err;
byte res = 0;
Wire.beginTransmission(addy);
Wire.write(reg);
err = Wire.endTransmission();
if (err != 0) {
I2Cerror = 1;
}
Wire.requestFrom((int) addy, (int) 1, false);
while (Wire.available()) { // slave may send less than requested
res = Wire.read(); // receive a byte
}
return res; // send the byte
}
byte checkRXbuffer()
{
// byte addy = 0x6C;
byte reg = 0x12;
return i2cread(transAdd, reg);
delay(50);
}
byte checkTXbuffer()
{
// byte addy = 0x6C;
byte reg = 0x11;
return i2cread(transAdd, reg);
}
Send I2C Command Array:
byte transAdd = 0x6C; // 0x6C 7bit address. 0xD8 - I2C to UART Chip 8-bit
address
void sendI2CCommandArray(byte commandBytes[], int len)
{
i2cwrite(transAdd, 0x09, 0x02); // disable the transmitter on transceiver
for (int i = 0; i < len; i++){

Related product manuals