#define <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#include <DHT.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//#include <LedControl.h>
// set to 1 if are implementing the user interface pot, awutch, etc
#define USE_UI_CONTROL 0
#if USE_UI_CONTROL
#include <MD_UISwistch.h>
#endif
// Turn on debug statements to the serial output
#define DEBU
#if DEBUG
#define PRINT(s, x) {serial.print(f(s)); serial.print(x); }
#define PRINT(x) Serial.println(f(x));
#define PRINT(x) Serial.println(x,HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif
//define the number of defices 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_MAX722XX: :PAROLA_HM
#define MAX DEVICES 11
#define CLK_PIN 13
#define DATA_PIN 11
#define CS-PIN 10
//HARDWARE SPI
MD_Parola p = MD_Parola(HARDWARE_TYPE_CS_PIN,MAX_DEVICES)
//SOFTWARE SPI
//MD_Parola P = HD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, MAX_DEVICES);
//scolling parameters
#if USE_UI_CONTROL
const uint8_t SPEED_IN = A5;
const uint8_t DIRECTION_SET = 8; // change the effect
const uint8_t INVERT_SET = 9; // change the invert
const uint8_t SPEED_DEADBAND = 5;
#endif // USE_UI_CONTROL
uint8_t scrollSpeed = 25; // default frame delay value
textEffect_t scrolEffect = PA_SCROLL_LRFT;
textPosition_t scrollAlign = PA_LEFT;
uint16_t scrollPause = 100; // in millisecond
// Global message buffers shared by serial and scrolling funtions
#define BUF_SIZE 100
char curMessage[BUF_SIZE] = {""};
char newMessage[BUF_SIZE] = {"RANGKAIAN ELEKTRONIKA SEDERHANA 7 TEGANGAN RENDAH-SISTEM KOMPUTER KAMPUS KOTA SERANG "}
bool newMessageAvaible = true;
#if USE_UI_CONTROL
MD_UISwitsch_Digital uiDirection(DIRECTION_SET);
MD_UISwitsch_Digital uiInvert(INVERT_SET);
void doUI(void)
{
// set the speed