Real time serial data display on matrix panel?

Ok, so i'm a total noob...Apologies in advance!

I have a 8x40 dot matrix display (5 daisy chained 8x8 Max2719 modules) which works just fine.

I've set up an LM35 temp sensor which is also good to go and producing good info.

My question - is there a relatively straightforward way to reference the serial data from the LM35 and display this on the matrix in real time?

Welcome to the forum.

Looks like you have already got a working electrical setup so that is very promising, so we just need to sort out the code.

A few questions:

  • What have you displayed on the matrix modules so far to be sure they are working, text and numbers?
  • What libraries are you using to talk to the MAX2719 and LM35?
  • Have you got a single sketch that can talk to the display and get sensor readings??
  • Can you post your existing sketch(s) (hint: use the code tags </> tool button)?

Hi, I found this in one of my sketch folders and made some quick changes to show you how to display text and numbers.

You will have to adapt for your display setup (Chip select pin and display count etc).

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>

int pinCS = A3; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI )
int numberOfHorizontalDisplays = 2;
int numberOfVerticalDisplays = 1;

Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays);

int pinRandom = A0;

int wait = 1000; // In milliseconds

int number = 0;
int old_number = 0;
  
void setup() {
  matrix.setIntensity(2); // Set brightness between 0 and 15

// Adjust to your own needs
//  matrix.setPosition(0, 0, 0); // The first display is at <0, 0>
//  matrix.setPosition(1, 1, 0); // The second display is at <1, 0>
//  matrix.setPosition(2, 2, 0); // The third display is at <2, 0>
//  matrix.setPosition(3, 3, 0); // And the last display is at <3, 0>
//  ...
//  matrix.setRotation(0, 2);    // The first display is position upside down
//  matrix.setRotation(3, 2);    // The same hold for the last display

  randomSeed(analogRead(pinRandom)); // Initialize random generator
}

void loop() {

  while(number==old_number) number = random(10); // generate a different random number emulating a temperature

  matrix.fillScreen(0);  // Must clear pixels each time otherwise pixels are not switched OFF
  matrix.setCursor(1,0); // Set cursor 1 pixel in from left and top pixel (y = 0) 
  matrix.print(number);  // Print to bitmap array (virtual screen in memory)
  matrix.write();        // Send bitmap array to the LED display (sets pixels ON), cursor will move on

  matrix.print("C");     // Print C to bitmap array
  matrix.write();        // Send bitmap array to the LED display (sets pixels ON)
  
  old_number = number;
  delay(wait);

}

Have a look at the Parola libraries at http://codeplex.parola.com. As long as you can create a string to display, the libraries will take care of managing the modules. There are examples to display data from a serial line to the matrix modules.

Worst case, you can steal some of the ideas in the code and implement your own.