#include "Arduino.h" #include <TM1638.h>

Now comes the variable initialisation part.

As seen on the video we connect the wires to 8,9,10 pins on TM1638 with TM1638 module(8, 9, 10); command.

For default interval I have chosen 1000ms which is the rate before it moves letters one forward for scrolling.

String textScroll is a variable containing the text that will get displayed on the display.

bckp variable will be used for reinitializing the text after it scrolled through. It may not be the best way of doing it since later we are popping letters out of string, but I tried to minize the amount of code and kinda simplify it 😀

Well buttons variable should be quite obvious so let’s continue to final previousMillis variable.

This variable will be used for helping to detect button press between moving the display letters. That’s because if we would use Delay command we would be essentially stopping the clock and unable to detect button press, or a lot harder and unintuitive to detect them.