Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <MD_Parola.h>
- #include <MD_MAX72xx.h>
- #include <SPI.h>
- #include "matrix.h"
- // --- M A K R O ------------------------------------------------------------------------------------------------ //
- //
- //
- //
- //
- // --- M D P A R O L A --- A L L S T U F F ------------------------------------------------------- //
- // DEFINICJE ustawień dla PAROLA ----------------- //
- #define HARDWARE_TYPE MD_MAX72XX::FC16_HW // 8 x matryca 8x8 ------------------------------- //
- #define PAROLA_MAX_DEVICES 8 // definicja ilości wyświetlaczy PAROLA ---------- //
- #define PAROLA_CLK_PIN 48 // PAROLA CLK PIN na SHIELD 48 --------------- //
- #define PAROLA_DATA_PIN 47 // PAROLA DATA PIN na SHIELD 47 --------------- //
- #define PAROLA_CS_PIN 46 // PAROLA CS PIN na SHIELD 46 --------------- //
- // ----------------------------------------------- //
- //
- MD_Parola P = MD_Parola (HARDWARE_TYPE, PAROLA_DATA_PIN, PAROLA_CLK_PIN, PAROLA_CS_PIN, PAROLA_MAX_DEVICES); //
- TMatrix matryca(P); // pseudo obiekt matryca dla obiektu P MD_Parola //
- //
- // --- K O N I E C D E F I N I C J I D L A P A R O L A --------------------------------------------------- //
- //
- //
- //
- //
- // --- S E T U P ---------------------------------------------------------------------------------------------- //
- //
- void setup(void)
- {
- P.begin();
- matryca.Init();
- } //
- // --- S E T U P K O N I E C ------------------------------------------------------------------------------------- //
- // ------------------------------------------------------------------------------------------------------------------- //
- // --- L O O P ------------------------------------------------------------------------------------------------- //
- //
- void loop(void)
- {
- //matryca.ShowEffectDemo();
- //matryca.ShowSpriteDemo();
- matryca.ShowRandomDemo();
- matryca.ShowDayName(6);
- matryca.ShowMonthName(2);
- } //
- // --- L O O P K O N I E C --------------------------------------------------------------------------------------- //
- // ------------------------------------------------------------------------------------------------------------------- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement