Advertisement
PowerTGS440

DEMO_MAIN

Feb 13th, 2021
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. #include <MD_Parola.h>
  2. #include <MD_MAX72xx.h>
  3. #include <SPI.h>
  4. #include "matrix.h"
  5.  
  6. // --- M A K R O ------------------------------------------------------------------------------------------------ //
  7. //
  8. //
  9. //
  10. //
  11. // --- M D P A R O L A --- A L L S T U F F ------------------------------------------------------- //
  12. // DEFINICJE ustawień dla PAROLA ----------------- //
  13. #define HARDWARE_TYPE MD_MAX72XX::FC16_HW // 8 x matryca 8x8 ------------------------------- //
  14. #define PAROLA_MAX_DEVICES 8 // definicja ilości wyświetlaczy PAROLA ---------- //
  15. #define PAROLA_CLK_PIN 48 // PAROLA CLK PIN na SHIELD 48 --------------- //
  16. #define PAROLA_DATA_PIN 47 // PAROLA DATA PIN na SHIELD 47 --------------- //
  17. #define PAROLA_CS_PIN 46 // PAROLA CS PIN na SHIELD 46 --------------- //
  18. // ----------------------------------------------- //
  19. //
  20. MD_Parola P = MD_Parola (HARDWARE_TYPE, PAROLA_DATA_PIN, PAROLA_CLK_PIN, PAROLA_CS_PIN, PAROLA_MAX_DEVICES); //
  21. TMatrix matryca(P); // pseudo obiekt matryca dla obiektu P MD_Parola //
  22. //
  23. // --- K O N I E C D E F I N I C J I D L A P A R O L A --------------------------------------------------- //
  24. //
  25. //
  26. //
  27. //
  28. // --- S E T U P ---------------------------------------------------------------------------------------------- //
  29. //
  30. void setup(void)
  31. {
  32. P.begin();
  33. matryca.Init();
  34. } //
  35. // --- S E T U P K O N I E C ------------------------------------------------------------------------------------- //
  36. // ------------------------------------------------------------------------------------------------------------------- //
  37. // --- L O O P ------------------------------------------------------------------------------------------------- //
  38. //
  39. void loop(void)
  40. {
  41. //matryca.ShowEffectDemo();
  42. //matryca.ShowSpriteDemo();
  43. matryca.ShowRandomDemo();
  44. matryca.ShowDayName(6);
  45. matryca.ShowMonthName(2);
  46. } //
  47. // --- L O O P K O N I E C --------------------------------------------------------------------------------------- //
  48. // ------------------------------------------------------------------------------------------------------------------- //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement