Here is my code:
//------------------------------------------------------------------------------------
/*
Program Title : Body Temperature Detector RGB Version
Author : Happy Sholihul Fathoni
File Revision : 0
*/
#include <RGBmatrixPanel.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h> //0x5A
#include "Arduino.h"
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
float objecttemp = 0.0;
int calup = 31;
int caldown = 30;
float calibrate_temp = 0.0;
#define CLK 11 // USE THIS ON ARDUINO MEGA
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);
void setup() {
Serial.begin(9600);
matrix.begin();
mlx.begin();
}
void loop() {
matrix.fillScreen(0);
delayMicroseconds(1);
objecttemp=mlx.readObjectTempC()+calibrate_temp;
matrix.setTextSize(1);
matrix.setTextWrap(false);
matrix.setCursor(3, 0);
matrix.setTextColor(matrix.Color333(0,7,0));
matrix.print(objecttemp);
while(digitalRead(calup) == LOW){calibrateup();}
while(digitalRead(caldown) == LOW){calibratedown();}
}
void calibrateup(){
calibrate_temp=calibrate_temp+1.0;
delay(300);
}
void calibratedown(){
calibrate_temp=calibrate_temp-1.0;
delay(300);
}
//------------------------------------------------------------------
I can't find the datasheet of RGB led matrix that I used. but I can give you a picture:
The brand is --> EXDROID
the type is --> L-L2525MX-P5RGB
is the Led matrix 1/8 or 1/16 scan?
is the RGBMatrix Library run for 1/8 or 1/16 scan for 64x32 led matrix?