# Συζήτηση Κυκλωμάτων > Παρουσίαση Ολοκληρωμένων Κατασκευών > Παρουσίαση Πρόχειρων Κατασκευών >  >  ΚΑΤΑΣΚΕΥΗ ΟΘΟΝΗΣ LED ΚΥΛΙΟΜΕΝΩΝ ΜΥΝΗΜΑΤΩΝ ΣΤΑ ΕΛΛΗΝΙΚΑ

## xkosm

*Arduino LED Matrix display in Greek! 


Τα υλικά που θα χρειαστούμε είναι:

Arduino nano
8x LED Matrix 8x8 MAX7219 modules
DS3231 RTC module
HC-06  Bluetooth module
DHT-22 Temp/Hum Sensor
LDR Photocell

Η αλλαγή κειμένου γίνεται και μέσω bluetooth απο συσκευή Android.

**Configuration protocol:*

*For time and date send: <THH:MM:SS dd/mm/yyyy>**For ticker text send: <tYour Text Here>**For brightness level send: <BAuto> or <Bvalue> (value from 1 to 16)* 














```
//Libraries
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>
#include <dht.h>
#include <Wire.h>
#include <RTClib.h>
#include <SoftwareSerial.h>

//Constants
SoftwareSerial btSerial(3, 4); // RX, TX
const int photoCell = A0;
dht DHT;
const int DHT22_PIN = 9; // Data pin of DHT 22 (AM2302)
RTC_DS1307 rtc;
char daysOfTheWeek[7][12] = {"KYRIAKH","DEYTERA", "TRITH", "TETARTH", "PEMPTH", "PARASKEYH", "SABBATO"};
const int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI )

const int numberOfHorizontalDisplays = 8;
const int numberOfVerticalDisplays = 1;
const int wait = 30; // In milliseconds TEXT SPEED
const int spacer = 1;
const int width = 5 + spacer; // The font width is 5 pixels
Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays);

//Variables
int chk, length, brLevel, photoCellValue, count=0;
float hum, temp;
String msg;
String temp1;
String humidity1;
String info;
boolean autoBR=true;
boolean messageCompleted=false;
boolean newMessage=false;
String tickerText = "OUONH PLHROFORIVN VRAS - UERMOKRASIAS - YGRASIAS ";
char incomingByte; 
String command;
unsigned long previousMillis = 0;        // will store last time LED was updated

void setup() {
  Serial.begin(9600);
  btSerial.begin(9600);
  rtc.begin();

  //rtc.adjust(DateTime(2017, 03, 21, 19, 47, 0));   // <----------------------SET TIME AND DATE: YYYY,MM,DD,HH,MM,SS
  matrix.setRotation(0, -1);    
  matrix.setRotation(1, -1);    
  matrix.setRotation(2, -1);    
  matrix.setRotation(3, -1);   
  matrix.setRotation(4, -1);
  matrix.setRotation(5, -1);
  matrix.setRotation(6, -1);
  matrix.setRotation(7, -1);
  matrix.setIntensity(1); // Use a value between 0 and 15 for brightness
  // Adjust to your own needs
  matrix.setPosition(0, 7, 0); // The first display is at <0, 0>
  matrix.setPosition(1, 6, 0); // The second display is at <1, 0>
  matrix.setPosition(2, 5, 0); // The third display is at <2, 0>
  matrix.setPosition(3, 4, 0); // And the last display is at <3, 0>
  matrix.setPosition(4, 3, 0); // And the last display is at <3, 0>
  matrix.setPosition(5, 2, 0); // And the last display is at <3, 0>
  matrix.setPosition(6, 1, 0);
  matrix.setPosition(7, 0, 0);
  
}

void loop() {
  unsigned long currentMillis = millis();
  communication();
  //Update thermometer and photoCell variables and on starting
  if (count==0){
    chk = DHT.read22(DHT22_PIN);
    //Read data and store it to variables hum and temp
    hum = DHT.humidity;
    temp= DHT.temperature;
    controlBR();
  }
  //Show content 
  if (currentMillis - previousMillis >= 1000) {
    previousMillis = currentMillis;
    count++; //Seconds
  }
  //First display the clock for 5sec
  if (count>=0 && count <11){
    time();
  }
  //Then the day of the week for 3sec
  else if (count>=11 && count<14){
    today();
  }
  //Then the date for 3sec
  else if (count>=14 && count<17){
    date();
  }
  //Then the temperature for 3sec
  else if (count>=17 && count<18){
    scroll2();  
    
  }
  //Then the humidity for 3sec
  else if (count>=18 && count<19){
    scroll3();
    
  }
else if (count>=19 && count<23){
  temp_hum();
  }
  //Finally the ticker text
  else if (count>=23){
   scroll();
    count=0; //<----reset
 }
}
//Bluetooth communication
void communication(){
  if (btSerial.available()){
    incomingByte = btSerial.read();
    if(incomingByte=='>'){
       messageCompleted=true;
       newMessage=false;
    }
    else if (incomingByte=='<'){
       newMessage=true;
    }

    if (newMessage){
       command.concat(incomingByte);
    }
  }

  if(messageCompleted){
    //Brightness level
    if (command.charAt(1)=='B'){
      if (command.substring(2)=="Auto"){
        autoBR=true;
      }
      else{
        autoBR=false;
        brLevel= (command.substring(2)).toInt() - 1;
        
      }
    }
    //Update clock
    else if (command.charAt(1)=='T'){
      int h = (command.substring(2,4)).toInt();
      int m = (command.substring(5,7)).toInt();
      int s = (command.substring(8,10)).toInt();
      int D = (command.substring(11,13)).toInt();
      int M = (command.substring(14,16)).toInt();
      int Y = (command.substring(17,21)).toInt();
      rtc.adjust(DateTime(Y,M,D,h,m,s)); // <----------------------SET TIME AND DATE: YYYY,MM,DD,HH,MM,SS
    }
    //Update ticker text
    else if (command.charAt(1)=='t'){
      tickerText=command.substring(2);   
      Serial.println(tickerText);   
    }
    command="";
    messageCompleted=false;
  }
}
//Control brightness - It will run on every complete loop!
void controlBR(){
  if (autoBR){
    photoCellValue = analogRead(photoCell);
    photoCellValue = map(photoCellValue,1023,0,0,15); 
    matrix.setIntensity(photoCellValue); // Use a value between 0 and 15 for brightness
  }
  else{
    matrix.setIntensity(brLevel); // Use a value between 0 and 15 for brightness
  }
}
//Print time
void time(){
   DateTime now = rtc.now();
   int HH = now.hour();
   int MM = now.minute();
   int SS = now.second();
   if (HH<10){
     msg = "0" + String(HH) + ":"; 
   }
   else{
     msg = String(HH) + ":";
   }
   if (MM<10){
     msg += "0" + String(MM) + ":";
   }
   else{
     msg += String(MM) + ":";
   }
   if (SS<10){
     msg += "0" + String(SS);
   }
   else{
     msg += String(SS);
   }
   length = msg.length() * width;
   //fill with blank spaces the rest of the display area
   for (int i = numberOfHorizontalDisplays*8-length; i>0; i--){
     msg += " ";
   }
   matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
   matrix.fillScreen(LOW);
   matrix.print(msg);
   matrix.write();
}
//Print day of week
void today(){
  DateTime now = rtc.now();
  //Day of week
  msg = daysOfTheWeek[now.dayOfTheWeek()];
  length = msg.length() * width;
  //fill with blank spaces the rest of the display area
  for (int i = 8; i>0; i--){
    msg += " ";
  }
  matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
  matrix.fillScreen(LOW);
  matrix.print(msg);
  matrix.write();
}
//Print date
void date(){
  DateTime now = rtc.now();
  //Date:
  int dd = now.day();
  int mm = now.month();
  int yyyy = now.year();
  if (dd<10){
    msg = "0" + String(dd) + "/"; 
  }
  else{
    msg = String(dd) + "/";
  }
  if (mm<10){
    msg += "0" + String(mm) + "/";
  }
  else{
    msg += String(mm) + "/";
  }
  msg += String(yyyy);
  length = msg.length() * width;
  //fill with blank spaces the rest of the display area
  for (int i = 8; i>0; i--){
    msg += " ";
  }
  matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
  matrix.fillScreen(LOW);
  matrix.print(msg);
  matrix.write();
}
//Print temp and humidity
void temperature() {
    temp1 = "UERM:" + String(temp,1) +"^";
    length = temp1.length() * width;
    //fill with blank spaces the rest of the display area
    for (int i = 8; i>0; i--){
      temp1 += "";
    }
    matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
    matrix.fillScreen(LOW);
    matrix.print(temp1);
    matrix.write();
}
void humidity(){
    humidity1 = "YGR:" + String(hum,1) +" %";
    length = humidity1.length() * width;
    //fill with blank spaces the rest of the display area
    for (int i = 8; i>0; i--){
      humidity1 += "";
    }
    matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
    matrix.fillScreen(LOW);
    matrix.print(humidity1);
    matrix.write();
}
void temp_hum() {
    info = String(temp,1) +"^  " + String(hum,0) +"%";
    length = info.length() * width;
    //fill with blank spaces the rest of the display area
    for (int i = 8; i>0; i--){
      info += "";
    }
    matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
    matrix.fillScreen(LOW);
    matrix.print(info);
    matrix.write();
}

//Ticker Text
void scroll(){
  for ( int i = 0 ; i < width * tickerText.length() + matrix.width() - 1 - spacer; i++ ) {

    matrix.fillScreen(LOW);

    int letter = i / width;
    int x = (matrix.width() - 1) - i % width;
    int y = (matrix.height() - 8) / 2; // center the text vertically

    while ( x + width - spacer >= 0 && letter >= 0 ) {
      if ( letter < tickerText.length() ) {
        matrix.drawChar(x, y, tickerText[letter], HIGH, LOW, 1);
      }

      letter--;
      x -= width;
    }

    matrix.write(); // Send bitmap to display

    delay(wait);
  }
}
//Control funcs. for display - Call them in void loop to test the LEDs



void scroll2(){
  temp1 = "UERMOKRASIA: " + String(temp,1) +"^_";
    length = temp1.length() * width;
  for ( int i = 0 ; i < width * temp1.length() + matrix.width() - 1 - spacer; i++ ) {

    matrix.fillScreen(LOW);

    int letter = i / width;
    int x = (matrix.width() - 1) - i % width;
    int y = (matrix.height() - 8) / 2; // center the text vertically

    while ( x + width - spacer >= 0 && letter >= 0 ) {
      if ( letter < temp1.length() ) {
        matrix.drawChar(x, y, temp1[letter], HIGH, LOW, 1);
      }

      letter--;
      x -= width;
    }

    matrix.write(); // Send bitmap to display

    delay(35);
  }
}

void scroll3(){
  humidity1 = "YGRASIA: " + String(hum,1) +" %";
    length = humidity1.length() * width;
  for ( int i = 0 ; i < width * humidity1.length() + matrix.width() - 1 - spacer; i++ ) {

    matrix.fillScreen(LOW);

    int letter = i / width;
    int x = (matrix.width() - 1) - i % width;
    int y = (matrix.height() - 8) / 2; // center the text vertically

    while ( x + width - spacer >= 0 && letter >= 0 ) {
      if ( letter < humidity1.length() ) {
        matrix.drawChar(x, y, humidity1[letter], HIGH, LOW, 1);
      }

      letter--;
      x -= width;
    }

    matrix.write(); // Send bitmap to display

    delay(35);
  }
}





void fullOn(){
  matrix.fillScreen(HIGH);
  matrix.write();
}
void fullOff(){
  matrix.fillScreen(LOW);
  matrix.write();
}
```


Βιβλιοθήκες και πληροφορίες:
https://drive.google.com/file/d/1Ed373vp3KIaD1mTbGDcxo833awky4Jso/view?usp=sharing


για επιπλέον πληροφορίες εδώ: https://xkosm.blogspot.com/2018/09/led.html


Η ιδέα της κατασκευής ξεκίνησε από επίσης Έλληνα χομπίστα από αυτή την ιστοσελίδα:
http://www.ardumotive.com/ledmatrixen.html

----------

αλπινιστης (05-09-18), 

agis68 (04-09-18), 

aktis (08-09-18), 

dinos.liaskos (05-09-18), 

elektronio (05-09-18), 

Eximnos (05-09-18), 

gep58 (05-09-18), 

gRooV (04-09-18), 

KOKAR (04-09-18), 

radiotimes (05-09-18), 

SRF (05-09-18), 

SV1EDG (12-09-18), 

ts0gl1s (04-09-18), 

vasilllis (04-09-18)

----------


## xkosm

Αναβάθμιση κώδικα για αλλαγή κυλιόμενου μυνήματος μέσω προγράμματος στα windows.




```

//Libraries
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>
#include <dht.h>
#include <Wire.h>
#include <RTClib.h>
#include <SoftwareSerial.h>

//Constants
SoftwareSerial btSerial(3, 4); // RX, TX
const int photoCell = A0;
dht DHT;
const int DHT22_PIN = 9; // Data pin of DHT 22 (AM2302)
RTC_DS1307 rtc;
char daysOfTheWeek[7][12] = {"KYRIAKH","DEYTERA", "TRITH", "TETARTH", "PEMPTH", "PARASKEYH", "SABBATO"};
const int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI )

const int numberOfHorizontalDisplays = 8;
const int numberOfVerticalDisplays = 1;
const int wait = 30; // In milliseconds TEXT SPEED
const int spacer = 1;
const int width = 5 + spacer; // The font width is 5 pixels
Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays);

//Variables
int chk, length, brLevel, photoCellValue, count=0;
float hum, temp;
String msg;
String temp1;
String humidity1;
String info;
boolean autoBR=true;
boolean messageCompleted=false;
boolean newMessage=false;
String tickerText = "OUONH PLHROFORIVN VRAS - UERMOKRASIAS - YGRASIAS ";
char incomingByte; 
String command;
unsigned long previousMillis = 0;        // will store last time LED was updated

void setup() {
  Serial.begin(9600);
  btSerial.begin(9600);
  rtc.begin();

  //rtc.adjust(DateTime(2017, 03, 21, 19, 47, 0));   // <----------------------SET TIME AND DATE: YYYY,MM,DD,HH,MM,SS
  matrix.setRotation(0, -1);    
  matrix.setRotation(1, -1);    
  matrix.setRotation(2, -1);    
  matrix.setRotation(3, -1);   
  matrix.setRotation(4, -1);
  matrix.setRotation(5, -1);
  matrix.setRotation(6, -1);
  matrix.setRotation(7, -1);
  matrix.setIntensity(1); // Use a value between 0 and 15 for brightness
  // Adjust to your own needs
  matrix.setPosition(0, 7, 0); // The first display is at <0, 0>
  matrix.setPosition(1, 6, 0); // The second display is at <1, 0>
  matrix.setPosition(2, 5, 0); // The third display is at <2, 0>
  matrix.setPosition(3, 4, 0); // And the last display is at <3, 0>
  matrix.setPosition(4, 3, 0); // And the last display is at <3, 0>
  matrix.setPosition(5, 2, 0); // And the last display is at <3, 0>
  matrix.setPosition(6, 1, 0);
  matrix.setPosition(7, 0, 0);
  
}

void loop() {
  unsigned long currentMillis = millis();
  communication();
  communication2();
  //Update thermometer and photoCell variables and on starting
  if (count==0){
    chk = DHT.read22(DHT22_PIN);
    //Read data and store it to variables hum and temp
    hum = DHT.humidity;
    temp= DHT.temperature;
    controlBR();
  }
  //Show content 
  if (currentMillis - previousMillis >= 1000) {
    previousMillis = currentMillis;
    count++; //Seconds
  }
  //First display the clock for 5sec
  if (count>=0 && count <11){
    time();
  }
  //Then the day of the week for 3sec
  else if (count>=11 && count<14){
    today();
  }
  //Then the date for 3sec
  else if (count>=14 && count<17){
    date();
  }
  //Then the temperature for 3sec
  else if (count>=17 && count<18){
    controlBR();
    scroll2();  
    
  }
  //Then the humidity for 3sec
  else if (count>=18 && count<19){
    controlBR();
    scroll3();
    
  }
else if (count>=19 && count<23){
  temp_hum();
  }
  //Finally the ticker text
  else if (count>=23){
   controlBR();
   scroll();
    count=0; //<----reset
 }
}
//Bluetooth communication
void communication(){
  if (btSerial.available()){
    incomingByte = btSerial.read();
    if(incomingByte=='>'){
       messageCompleted=true;
       newMessage=false;
    }
    else if (incomingByte=='<'){
       newMessage=true;
    }

    if (newMessage){
       command.concat(incomingByte);
    }
  }

  if(messageCompleted){
    //Brightness level
    if (command.charAt(1)=='B'){
      if (command.substring(2)=="Auto"){
        autoBR=true;
      }
      else{
        autoBR=false;
        brLevel= (command.substring(2)).toInt() - 1;
        
      }
    }
    //Update clock
    else if (command.charAt(1)=='T'){
      int h = (command.substring(2,4)).toInt();
      int m = (command.substring(5,7)).toInt();
      int s = (command.substring(8,10)).toInt();
      int D = (command.substring(11,13)).toInt();
      int M = (command.substring(14,16)).toInt();
      int Y = (command.substring(17,21)).toInt();
      rtc.adjust(DateTime(Y,M,D,h,m,s)); // <----------------------SET TIME AND DATE: YYYY,MM,DD,HH,MM,SS
    }
    //Update ticker text
    else if (command.charAt(1)=='t'){
      tickerText=command.substring(2);   
      Serial.println(tickerText);   
    }
    command="";
    messageCompleted=false;
  }
}


void communication2(){
  if (Serial.available()){
    incomingByte = Serial.read();
    if(incomingByte=='>'){
       messageCompleted=true;
       newMessage=false;
    }
    else if (incomingByte=='<'){
       newMessage=true;
    }

    if (newMessage){
       command.concat(incomingByte);
    }
  }

  if(messageCompleted){
    //Brightness level
    if (command.charAt(1)=='B'){
      if (command.substring(2)=="Auto"){
        autoBR=true;
      }
      else{
        autoBR=false;
        brLevel= (command.substring(2)).toInt() - 1;
        
      }
    }
    //Update clock
    else if (command.charAt(1)=='T'){
      int h = (command.substring(2,4)).toInt();
      int m = (command.substring(5,7)).toInt();
      int s = (command.substring(8,10)).toInt();
      int D = (command.substring(11,13)).toInt();
      int M = (command.substring(14,16)).toInt();
      int Y = (command.substring(17,21)).toInt();
      rtc.adjust(DateTime(Y,M,D,h,m,s)); // <----------------------SET TIME AND DATE: YYYY,MM,DD,HH,MM,SS
    }
    //Update ticker text
    else if (command.charAt(1)=='t'){
      tickerText=command.substring(2);   
      Serial.println(tickerText);   
    }
    command="";
    messageCompleted=false;
  }
}





//Control brightness - It will run on every complete loop!
void controlBR(){
  if (autoBR){
    photoCellValue = analogRead(photoCell);
    photoCellValue = map(photoCellValue,1023,0,0,15); 
    matrix.setIntensity(photoCellValue); // Use a value between 0 and 15 for brightness
  }
  else{
    matrix.setIntensity(brLevel); // Use a value between 0 and 15 for brightness
  }
}
//Print time
void time(){
   DateTime now = rtc.now();
   int HH = now.hour();
   int MM = now.minute();
   int SS = now.second();
   if (HH<10){
     msg = "0" + String(HH) + ":"; 
   }
   else{
     msg = String(HH) + ":";
   }
   if (MM<10){
     msg += "0" + String(MM) + ":";
   }
   else{
     msg += String(MM) + ":";
   }
   if (SS<10){
     msg += "0" + String(SS);
   }
   else{
     msg += String(SS);
   }
   length = msg.length() * width;
   //fill with blank spaces the rest of the display area
   for (int i = numberOfHorizontalDisplays*8-length; i>0; i--){
     msg += " ";
   }
   matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
   matrix.fillScreen(LOW);
   matrix.print(msg);
   matrix.write();
}
//Print day of week
void today(){
  DateTime now = rtc.now();
  //Day of week
  msg = daysOfTheWeek[now.dayOfTheWeek()];
  length = msg.length() * width;
  //fill with blank spaces the rest of the display area
  for (int i = 8; i>0; i--){
    msg += " ";
  }
  matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
  matrix.fillScreen(LOW);
  matrix.print(msg);
  matrix.write();
}
//Print date
void date(){
  DateTime now = rtc.now();
  //Date:
  int dd = now.day();
  int mm = now.month();
  int yyyy = now.year();
  if (dd<10){
    msg = "0" + String(dd) + "/"; 
  }
  else{
    msg = String(dd) + "/";
  }
  if (mm<10){
    msg += "0" + String(mm) + "/";
  }
  else{
    msg += String(mm) + "/";
  }
  msg += String(yyyy);
  length = msg.length() * width;
  //fill with blank spaces the rest of the display area
  for (int i = 8; i>0; i--){
    msg += " ";
  }
  matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
  matrix.fillScreen(LOW);
  matrix.print(msg);
  matrix.write();
}
//Print temp and humidity
void temperature() {
    temp1 = "UERM:" + String(temp,1) +"^";
    length = temp1.length() * width;
    //fill with blank spaces the rest of the display area
    for (int i = 8; i>0; i--){
      temp1 += "";
    }
    matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
    matrix.fillScreen(LOW);
    matrix.print(temp1);
    matrix.write();
}
void humidity(){
    humidity1 = "YGR:" + String(hum,1) +" %";
    length = humidity1.length() * width;
    //fill with blank spaces the rest of the display area
    for (int i = 8; i>0; i--){
      humidity1 += "";
    }
    matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
    matrix.fillScreen(LOW);
    matrix.print(humidity1);
    matrix.write();
}
void temp_hum() {
    info = String(temp,1) +"^  " + String(hum,0) +"%";
    length = info.length() * width;
    //fill with blank spaces the rest of the display area
    for (int i = 8; i>0; i--){
      info += "";
    }
    matrix.setCursor((numberOfHorizontalDisplays*8-length)/2,0); // Center text 
    matrix.fillScreen(LOW);
    matrix.print(info);
    matrix.write();
}

//Ticker Text
void scroll(){
  for ( int i = 0 ; i < width * tickerText.length() + matrix.width() - 1 - spacer; i++ ) {

    matrix.fillScreen(LOW);

    int letter = i / width;
    int x = (matrix.width() - 1) - i % width;
    int y = (matrix.height() - 8) / 2; // center the text vertically

    while ( x + width - spacer >= 0 && letter >= 0 ) {
      if ( letter < tickerText.length() ) {
        matrix.drawChar(x, y, tickerText[letter], HIGH, LOW, 1);
      }

      letter--;
      x -= width;
    }

    matrix.write(); // Send bitmap to display

    delay(wait);
  }
}
//Control funcs. for display - Call them in void loop to test the LEDs



void scroll2(){
  temp1 = "UERMOKRASIA: " + String(temp,1) +"^_";
    length = temp1.length() * width;
  for ( int i = 0 ; i < width * temp1.length() + matrix.width() - 1 - spacer; i++ ) {

    matrix.fillScreen(LOW);

    int letter = i / width;
    int x = (matrix.width() - 1) - i % width;
    int y = (matrix.height() - 8) / 2; // center the text vertically

    while ( x + width - spacer >= 0 && letter >= 0 ) {
      if ( letter < temp1.length() ) {
        matrix.drawChar(x, y, temp1[letter], HIGH, LOW, 1);
      }

      letter--;
      x -= width;
    }

    matrix.write(); // Send bitmap to display

    delay(30);//speed
  }
}

void scroll3(){
  humidity1 = "YGRASIA: " + String(hum,1) +" %";
    length = humidity1.length() * width;
  for ( int i = 0 ; i < width * humidity1.length() + matrix.width() - 1 - spacer; i++ ) {

    matrix.fillScreen(LOW);

    int letter = i / width;
    int x = (matrix.width() - 1) - i % width;
    int y = (matrix.height() - 8) / 2; // center the text vertically

    while ( x + width - spacer >= 0 && letter >= 0 ) {
      if ( letter < humidity1.length() ) {
        matrix.drawChar(x, y, humidity1[letter], HIGH, LOW, 1);
      }

      letter--;
      x -= width;
    }

    matrix.write(); // Send bitmap to display

    delay(30);//speed
  }
}



void fullOn(){
  matrix.fillScreen(HIGH);
  matrix.write();
}
void fullOff(){
  matrix.fillScreen(LOW);
  matrix.write();
}
```




Το πρόγραμμα για WINDOWS.



και από εδώ του κατασκευαστή.

----------

SV1EDG (12-09-18)

----------

