For what it is worth....
This is the FUNCTION I use to display the temperature on the display.
This is ONLY the bit of code which is called to display it.
So other things are set before/outside this code.
void new_display_temperature(float value, byte pos)
{
//
if (sub_debug == 1)
{
Serial.println("T1");
}
if (TimeShown == 1) // If set, wipe display
{
//
// Clear display of time shown.
//
wipe(15);
TimeShown = 0; // Turn off flag.
}
// byte pos = 8; // Position on display where first digit is shown. SHOULD BE EXTERNAL SET
byte digit_counter = pos; // Sneaky, because if used for second digit, can't use the 8 as before.
byte len;
byte count = 0;
char buffer[6];
dtostrf(value, 2,0, buffer); // Alas no decimal accuracy. :( But if ever I can work out how to get it.....
if (value_debug == 1)
{
Serial.print("1-> ");
Serial.println(buffer);
Serial.print("2-> ");
}
sprintf(message, "%s", buffer);
if (value_debug == 1)
{
Serial.println(message);
}
message_length = strlen(message);
//
len = format(message); // Change message format to required.
//
if (value_debug == 1)
{
//
Serial.print("Message is -> ");
Serial.println(message);
Serial.print("Message length is ");
Serial.println(len);
}
delay(2000);
while (count < message_length)
{
MAX7219senddata( (pos-count) , bmessage[count] );
count = count + 1;
digit_counter = digit_counter - 1;
// delay(400);
// delay(10);
}
//
byte j = 99; // This is the degree symbol
byte k = 13; // This is the c symbol Could be made to be capitol C rather than lower case.
// For Capitol C = 78.
// MAX7219senddata(9, 239); // Don't decode all digits bits set = decode. This has bit 5 set to 0.
MAX7219senddata(9, 207); // Don't decode all digits bits set = decode. This has bit 5 and 4 set to 0.
//
// pos - message_length = where the last thing was shown.
MAX7219senddata((pos+1-message_length-1),j);
MAX7219senddata((pos+1-message_length-2),k);
}
Ok, I am probably wrong.
And I haven't included the format() routine.
I get that this isn't going to be a walk in the park but with the code/s supplied by you both, I am seeing patterns that look close to what I want to do.
I'll post that shortly.