资源简介
松下红外矩阵摄像头资料 里面包含datasheet 和一些使用手册,方便大家开发
代码片段和文件信息
#include “Adafruit_AMG88xx.h“
bool Adafruit_AMG88xx::begin(uint8_t addr)
{
_i2caddr = addr;
_i2c_init();
//enter normal mode
_pctl.PCTL = AMG88xx_NORMAL_MODE;
write8(AMG88xx_PCTL _pctl.get());
//software reset
_rst.RST = AMG88xx_INITIAL_RESET;
write8(AMG88xx_RST _rst.get());
//disable interrupts by default
disableInterrupt();
//set to 10 FPS
_fpsc.FPS = AMG88xx_FPS_10;
write8(AMG88xx_FPSC _fpsc.get());
return true;
}
void Adafruit_AMG88xx::setMovingAverageMode(bool mode)
{
_ave.MAMOD = mode;
write8(AMG88xx_AVE _ave.get());
}
void Adafruit_AMG88xx::setInterruptLevels(float high float low)
{
setInterruptLevels(high low high * .95);
}
void Adafruit_AMG88xx::setInterruptLevels(float high float low float hysteresis)
{
int highConv = high / AMG88xx_PIXEL_TEMP_CONVERSION;
highConv = constrain(highConv -4095 4095);
_inthl.INT_LVL_H = highConv & 0xFF;
_inthh.INT_LVL_H = (highConv & 0xF) >> 4;
this->write8(AMG88xx_INTHL _inthl.get());
this->write8(AMG88xx_INTHH _inthh.get());
int lowConv = low / AMG88xx_PIXEL_TEMP_CONVERSION;
lowConv = constrain(lowConv -4095 4095);
_intll.INT_LVL_L = lowConv & 0xFF;
_intlh.INT_LVL_L = (lowConv & 0xF) >> 4;
this->write8(AMG88xx_INTLL _intll.get());
this->write8(AMG88xx_INTLH _intlh.get());
int hysConv = hysteresis / AMG88xx_PIXEL_TEMP_CONVERSION;
hysConv = constrain(hysConv -4095 4095);
_ihysl.INT_HYS = hysConv & 0xFF;
_ihysh.INT_HYS = (hysConv & 0xF) >> 4;
this->write8(AMG88xx_IHYSL _ihysl.get());
this->write8(AMG88xx_IHYSH _ihysh.get());
}
void Adafruit_AMG88xx::enableInterrupt()
{
_intc.INTEN = 1;
this->write8(AMG88xx_INTC _intc.get());
}
void Adafruit_AMG88xx::disableInterrupt()
{
_intc.INTEN = 0;
this->write8(AMG88xx_INTC _intc.get());
}
void Adafruit_AMG88xx::setInterruptMode(uint8_t mode)
{
_intc.INTMOD = mode;
this->write8(AMG88xx_INTC _intc.get());
}
void Adafruit_AMG88xx::getInterrupt(uint8_t *buf uint8_t size)
{
uint8_t bytesToRead = min(size 8);
this->read(AMG88xx_INT_OFFSET buf bytesToRead);
}
void Adafruit_AMG88xx::clearInterrupt()
{
_rst.RST = AMG88xx_FLAG_RESET;
write8(AMG88xx_RST _rst.get());
}
float Adafruit_AMG88xx::readThermistor()
{
uint8_t raw[2];
this->read(AMG88xx_TTHL raw 2);
uint16_t recast = ((uint16_t)raw[1] << 8) | ((uint16_t)raw[0]);
return signedMag12ToFloat(recast) * AMG88xx_THERMISTOR_CONVERSION;
}
void Adafruit_AMG88xx::readPixels(float *buf uint8_t size)
{
uint16_t recast;
float converted;
uint8_t bytesToRead = min(size << 1 AMG88xx_PIXEL_ARRAY_SIZE << 1);
uint8_t rawArray[bytesToRead];
this->read(AMG88xx_PIXEL_OFFSET rawArray bytesToRead);
for(int i=0; i uint8_t pos = i << 1;
recast = ((uint16_t)rawArray[pos + 1] << 8) | ((uint16_t)rawArray[pos]);
converted = signedMag12ToFloat(recast) * AMG88xx_PIXEL_TEMP_CONVERSION;
buf[i] = converted;
}
}
void Adafruit_AMG88xx::write8(byte reg byte value)
{
this->write(reg &value 1);
}
uint8_t Adafruit_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3994 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\Adafruit_AMG88xx.cpp
文件 7032 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\Adafruit_AMG88xx.h
文件 3170 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\amg88xx_interrupt\amg88xx_interrupt.ino
文件 1503 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\amg88xx_test\amg88xx_test.ino
文件 1577 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\pixels_test\pixels_test.ino
文件 4478 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\thermal_cam\thermal_cam.ino
文件 5445 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\thermal_cam_featherwing\thermal_cam_featherwing.ino
文件 135 2017-07-05 15:28 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\README.md
文件 225764 2018-03-05 16:34 AMG8833 8831资料\原理图\amg8833_sch.jpg
文件 153871 2017-11-16 10:45 AMG8833 8831资料\手册\AMG8831.pdf
文件 216245 2017-10-27 16:20 AMG8833 8831资料\手册\AMG8833.pdf
文件 420074 2018-03-15 19:49 AMG8833 8831资料\手册\amg88xx.pdf
文件 2726947 2018-03-15 19:49 AMG8833 8831资料\手册\参考资料.pdf
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\amg88xx_interrupt
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\amg88xx_test
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\pixels_test
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\thermal_cam
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples\thermal_cam_featherwing
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx\examples
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master\Adafruit_AMG88xx
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码\Adafruit_AMG88xx-master
目录 0 2018-03-07 20:23 AMG8833 8831资料\arduino测试代码
目录 0 2018-03-15 19:49 AMG8833 8831资料\原理图
目录 0 2018-03-15 19:50 AMG8833 8831资料\手册
目录 0 2018-03-15 19:59 AMG8833 8831资料
----------- --------- ---------- ----- ----
3770235 25
- 上一篇:完整人脸点云
- 下一篇:NOIP模拟赛 试题
评论
共有 条评论