i'm now testing the mlx90640 for use as a thermal cam sensor. first thing i notices when i mounted it was that the image i saw in terminal needed to be inverted. so this feature has been added to test file setup and can be downloaded here:
https://github.com/jamesdanielv/thermal_cam_mlx90640/blob/master/fullsensorreadToterminal.zip
it is a simple setting
//#define MLX90640_mirror false
the code for it is almost as simple as we just reverse order memory is read from single 32 word line buffer
for (int i=0; i<24;i++){//this samples and draws entire page of data. sensor is
MLX90640_I2CRead(MLX90640_address, 0x0400+32*i, 32, mydata);//read 32 places in memory
#if MLX90640_mirror == false
for (int x = 0 ; x < 32 ; x+=1) //this is normal sensor mode
#else
for (int x = 32 ; x >0 ; x-=1) //this is mirrored sensor mode
#endif
{ //we compare active one row to see at output
int testx=(50+mydata[x]-startvalue[x]);
char outputx=46;
if (testx>60){outputx=44;}//+
if (testx>70){outputx=111;}//o
if (testx>80){outputx=79;}//O
if (testx>100){outputx=64;}//@
Serial.print (outputx);Serial.print(F(" "));
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.