The project is powered by PointCloud.Ai. It's demo of PCIR-xxCx series consist of python's examples on computer and java's examples on android phone.These product compatible with melexis IR sensors MLX90640,MLX90641 and MLX90621.
python on computer: Python Example command line：python ir_demo.py serialPort [serial Baud rate]
python3 ir_demo.py /dev/cu.usbserial-1410(/dev/cu.usbserial-1410 should replaced by your serial port which named like COMx on windows or /dev/cu.xxxxx on OSX)
java on android: Android Example
2. development kit
2. running Visual Monitor Demo
this demo demonstrator how to send command to device and handle result from device, also illustrator how to process data frame on host.
this mode is for customer evaluate temperature precision result if suitable for their product as soon as possible.
After power on, module will output the ASCII temperature data, each frame ends with
\r\n on 3FPS.
Output resolution of PCIR-40CA/PCIR-40CB is 32x24.
temperature data of each point is float with 2 decimal places. Row precedence.
example: a frame = 32x24(768 points' data)
this mode is for integrate to product, Data format is following: data frame format: 'DAT' + Data Bytes Length[2 bytes] + Envirment Temp[4 Bytes float type] + data[pixelx4bytes float] + '/r/n'
example mlx90640 32x24 pixel: 3Bytes + 2Byte + 4Bytes + 32X24X4 + 2Bytes = 3083Bytes example mlx90641 16x12 pixel: 3Bytes + 2Byte + 4Bytes + 16X12X4 + 2Bytes = 779Bytes
a typical use is following line:
Send setting command 'CMDE\0\0' Send setting command 'CMDF\2\0' Send open command 'CMDC\1\0' Parser receive data 'DAT',validate data Length equal to sensor pixel and frame end '\r\n'.
Open command: Type = C Value = [1-open | 0-close | 2- 1 Frame if Mode command ==0] Mode command: Type = M Value = [0-receive frame manual | 1-receiver frame continuous] Object command: Type = O value = [1-body measure| 0-object measure] Freq command: Type = F Value = [0-1/2fps | 1-1fps | 2-2fps | 3-3fps | 4-4fps] Version command: Type = V Value =  Evaluate command: Type = E Value = [ 0-Operate mode | 1- Evaluate mode | 2- get Evaluate mode status] (When you set evaluate command, this status will save to rom to keep the status after reboot) Offset get command: Type = T Value = [0-get common offset] Offset set command: this command have 9BYTE= 'CMDE'+Value[4Byte float format]+CRC[1Byte]. (When you set offset command, this status will save to rom to keep the status after reboot)
Open result: 'RET' + Open Command[6 bytes] + '\r\n' Mode result: 'RET' + Mode Command[6 bytes] + '\r\n' Object result: 'RET' + Object Command[6 bytes] + '\r\n' Freq result: 'RET' + Freq Command[6 bytes] + '\r\n' Version result: 'RETCMDV' + firmware version[4 bytes] + ',' + calibrate version[4 bytes] + '\r\n' Evaluate command: 'RETCMDE' + type[1 bytes] + '\r\n' Offset command: 'RETCMDT' + common offset[6 bytes] + '\r\n'
the difference distance need calibration for accurate body temperature measurement. we offer calibration file to adjust actual temperature value suitable for real environment. for use calibration tools you maybe install esp32-idf framework
1 calibration version 2.0 common offset of temperature
cd [caliration directory] ./spiffsgen.py 20480 ./data/ ./cali_001.bin
./esptool.py -p /dev/cu.usbserial-1420 -b 230400 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x110000 ./cali_001.bin