// Program to demonstrate the MD_Parola library
//
// Simplest program that does something useful - Hello World!
//
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
//
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
// Hardware SPI connection
MD_MAX72XX grobj = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_MAX72XX P = MD_MAX72XX(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
void setup(void)
{
grobj.begin();
Serial.begin(9600);
String str = "régen";
char charr[10];
str.toCharArray(charr,7);
Serial.println((uint16_t)'é', HEX);
Serial.println('é', HEX);
Serial.println(charr);
}
void loop(void)
{
//Serial.println();
uint8_t data = random(256);
grobj.setBuffer(10, 1, &data);
grobj.setChar(31, random(256));
if (Serial.available()) {
byte c = Serial.read();
if (c == 0xC3) {
c = Serial.read() + 64;
grobj.setChar(21, c);
}
Serial.println(c, HEX);
}
delay(1000);
}