Arduino text scrolls

Scrolling Text With Arduino and Adafruit TFT Shield

Introduction: Scrolling Text With Arduino and Adafruit TFT Shield

What we are going to do: demonstrate text scrolling with an Arduino and an Adafruit 2.8 inch TFT touch shield

What we will use
Arduino Uno
Adafruit 2.8 inch TFT touch shield

Mount TFT shield on Arduino
Take care to avoid bending pins — it does go together

Step 1: Arduino Sketch and Ino File Attachment

The following Arduino sketch is the program that makes the text scroll.

Scrolling Text on ADAFRUIT TFT Arduino Shield

sketch uses Adafruit libraries — for more information

a Renfrew Arduino 2014 project — public domain

(scroll routine thanks to Andrew Wendt)

#include «SPI.h» // SPI display

#include «Adafruit_GFX.h» // Adafruit graphics

#include «Adafruit_ILI9341.h» // ILI9341 screen controller

#define TFT_DC 9

#define TFT_CS 10

Adafruit_ILI9341 tft=Adafruit_ILI9341(TFT_CS, TFT_DC); // hardware SPI

tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK); // White on black

tft.setTextWrap(false); // Don’t wrap text to next line

tft.setTextSize(5); // large letters

tft.setRotation(1); // horizontal display

String text = » . . Text scrolling on Adafruit TFT shield . .»; // sample text

const int width = 18; // width of the marquee display (in characters)

// Loop once through the string

Step 2: How It Works

In this demo we displayed this text string:
. . Text Scrolling with Adafruit TFT shield .. (47 characters?)
The text displays in scrolling marquee fashion, in large letters, with 18 characters across the screen.
You can replace the text with your own message that you want to scroll across the screen.

How the Sketch works
— most of the work in assembling the strings of characters to display is done in this line:
t+= text.charAt ((offset + i) % text.length());
If you understand that line, you don’t need any further explanation; stop reading.

— continuing on
For everyone else, you have to understand how this routine works or it won’t be interesting, so keep reading.
In this explanation we will uses a simpler example, with a shorter text.
String text = «Hello» (which is 5 characters).
And we will define a shorter marquee display width.
const int width = 10;
Our goal is to display these strings consecutively in the display window:

To keep track of where we start each consecutive text string we use the variable ‘offset’.
offset is incremented in the following line to change the starting point of the display string.
for (int offset = 0; offset Add Tip Ask Question Comment Download

Be the First to Share

Did you make this project? Share it with us!


Scrolling Text Display (A to Z Guide)

Introduction: Scrolling Text Display (A to Z Guide)

In this instructable / video I will guide you with step by step instructions how to make scrolling text display with Arduino.
I won’t be explaining how to make code for Arduino, I will show you how to use existing code. What and where you need to connect and install that you could make scrolling text display like this without any previous knowledge of Arduino.

Provided Amazon links are affiliates

Tools You’ll Need:

Materials You’ll Need:

You can follow me:

Step 1: Preview

Preview of the mini scrolling text display.

Like what I do? Consider becoming a PATRON! This is a great way to support my work and get extra benefits!

Step 2: Cutting Plywood

To make a simple box first I cut sides, top and bottom from 6mm plywood. Add painters or electrical tape to prevent any chipping.

Step 3: New Jig

If you wondering, this is my new jig for bevel cuts for my jigsaw table. It’s very simple jig, but very useful.

Clamped stop block helps to cut pieces at the same size.

Step 4: Gluing

Connect all sides with painters tape and glue them.

Step 5: Cutting Front and Back

Then I cut front and back pieces. In front piece I drilled hole and made hole for LED displays with a fretsaw.

To get straight looking cuts I trimmed inside with a jigsaw.

Step 6: Making Slot for the Chips

I routed slots for chips of the LED display, as I wanted that display would be flush with outside of the front piece.

Step 7: Components That You Need

For this build you need (links in first page):

  • Arduino Nano
  • 2x 8×8 LED displays
  • Voltage booster
  • Protected 18650 battery
  • Battery holder
  • On/Off switch

Before soldering Voltage booster to the circuit make sure to adjust it’s output voltage to 5V with potentiometer on the chip.

Step 8: Before Soldering

If you get prompt messages like in a picture just agree and install.

Step 9: Download Additional Files

That code would work you need extra libraries for the Arduino. Download here

Unzip it and copy «MaxMatrix» folder to Arduino’s «libraries» folder and you are good to go.

Step 10: Arduino Software Set Up

When you start Arduino software first you need to choose Arduino type. In our case it’s Arduino Nano (1st picture).

Then you need to open Serial Monitor window (2nd picture).

If you get red error like this, you need to choose right USB port in which your Arduino is connected (3-4th picture).

Just try choosing different ports until you can open Serial Monitor window without error (4-5th picture).

Step 11: Uploading the Code

Now you need to copy ant paste entire code to the new empty sketch file.

Press upload button, it will ask that you save project file.

Program starts compiling/generating code and starts uploading.

Step 12: Error While Uploading

If your upload take a while (15s+) and you get red error message like this you need to change Processor «ATmega328P» to Processor «ATmega328P (Old bootloader)».

Now upload should be successful.

Step 13: Configuring Display

You can customize showing text, scrolling speed and display brightness at these locations (see pictures).

Step 14: Battery Life

With 3000 mAh battery at Level 5 brightness display should run more than 20 hours, at 10 – more than 14 hours and at 15 – more than 12 hours. Also you can power it from a wall charger.

Step 15: Making Display

Back to the build, I cut pins, and soldered wires:

  • From first display top — VCC to VCC — on second display bottom.
  • From first display top — GNDto GND — on second display bottom.
  • From first display top — DOUT to DIN — on second display bottom.
  • From first display top — CS to CS — on second display bottom.
  • From first display top — CLK to CLK — on second display bottom.

And then I hot glued display to the plywood.

Step 16: Making Holes

One hole must be made for USB mini cable and other for the power button.

Step 17: Small Blocks and Battery Holder

I glued two squares that back piece won’t go further inside from the top. And to prevent going inside from the bottom will help this battery holder with battery inside. To glue it use something like 30 minute epoxy.

Step 18: Soldering Wires

I soldered 5 wires to the first display’s bottom.

Step 19: Connecting Display to Arduino

Wires from LED display goes to Arduino:

  • VCC to 5V
  • GND to GND
  • DIN to D12
  • CLK to D11
  • CS to D10

Wires from voltage booster (VOUT+ and VOUT-) will go to VIN (+) and GND (-).

Step 20: Small Blocks in the Front

Also I glued small blocks on which later I will glue front piece with LED displays.

Step 21: Final Soldering

Wires that I previously soldered to Arduino’s VIN and GND goes to voltage booster’s VOUT+ AND VOUT-.

Two extra wires must be soldered to power switch.

One wire from power switch goes to batteries Positive contact and other to booster’s VIN+ contract.

And the Negative wire from the battery goes to booster’s VIN- contact.

Step 22: Testing

I tested if panel works and it looks good so I wrapped booster module with electrical tape.

I glued one additional wood block which will help to hold Arduino and will be place for the back screw.

Step 23: Finishing

I made hole for the screw and glued front panel.

Step 24: Final Touches

Finally I added some wood oil, attached the back and glued small silicone feet.

Step 25: END

And that’s it — the build is finished!
I hope this instructable / video was useful and informative. If you liked it, you can support me by liking this Instructable / YouTube video and subscribing for more future content. That means a lot!

Feel free to leave any questions about this build.

Thank you, for reading / watching!

You can follow me:

You can support my work:

Be the First to Share

Did you make this project? Share it with us!


Microcontroller Contest

Metal Contest

Back to School: Student Design Challenge


Question 2 years ago

hey! I am about to make your project. firstly thanks for sharing your detailed good looking project :) I am asking you to send the sheme of the breadboard sequence. I am a beginner and and Im making your project for my cource project. before soldering I really need to see the breadboard wiring with jumper. If you reply I would be soo glad :)

Question 2 years ago

hey! I am about to make your project. firstly thanks for sharing your detailed good looking project :) I am asking you to send the sheme of the breadboard sequence. I am a beginner and and Im making your project for my cource project. before soldering I really need to see the breadboard wiring with jumper. If you reply I would be soo glad :))

Tip 3 years ago

Nice project sir.
These LED matrix are supposed to be stacked end to end, not side by side. I use these quite a lot. I wrote my own driver because nearly everything out there uses the same code, which forces the user to solder them side by side (as here), rather than using plugs and sockets, one to the other, which is much nicer. :) I have one in the back of my car (four segments)
«Caution (triangle symbol) (long space) Live Bees»

And at the moment I have a «Christmas» one at work (5 segments) with X mass messages, snow flakes, xmas trees, holly leaves and sledges etc.
Making your own graphics is easy, just edit «unused» characters. The sledge is made from two characters. You can write a little excel sheet to convert your patterns of 1s into the correct numbers.

Reply 3 years ago

Thanks! That’s what I thought, but in reverse — why those connections are so poorly placed if the all codes goes to the side and not the top!
Some day I will do it also for my car too, but with Bluetooth or WiFi modules, that would be fun.
Also on this page you can create your own graphics
An acetate gel sheet is definetely good idea to hide these displays for more clean look!
Thanks for the feedback! :)

Reply 3 years ago

Sorry, I had no idea that I had a reply.
Thanks for the link. Bookmarked! Takes the tedium out of it.

Awesome operate here! Incredibly nicely published, with intensive depth, and that is uncommon as of late. I also like your jigsaw table.

Tip 3 years ago

If you add an acetate gel sheet to the front of your display, the same transmissive frequency as your display (i.e. red in this case), you get a better contrast and you don’t so easily see the ‘off’ LEDs.

Reply 3 years ago

Very nice! Thanks for sharing!

Nice work here! Very well written, with extensive detail, which is rare these days. I also like your jigsaw table. I have some extra skate bearings and am now inspired to use them as a blade guide

Reply 3 years ago

Thank you! I like my jigsaw table too :D he he. It makes small woodworking projects like this so much easier. Good luck with your build! :)

Top quality instructable. Detailed and informative. Many thanks for taking the extra time to make this an excellent post.

Reply 3 years ago

Thanks, trying my best to make quality > quantity content. :) I am glad you liked it!

«Wires from voltage booster (VOUT+ and VOUT-) will go to VIN (+) and GND (-)»

Is this really safe? I’ve read online that the Vin pin in the Arduino has to be used only for 7-12V supplies. I’m asking because I’ve never been able to make any of my arduino projects portable because of this issue. Could I supply regulated 5V power to the Arduino’s 5V or Vin pin, too?

Reply 3 years ago

First I even tried to power Arduino directly from the battery, but it didn’t like it. I get random shut downs / resets.
So for this very small project I used 1A voltage booster to get constant 5V. I ran this display like this in total

48 hours and it works perfect. Of course it would be better to use two batteries and step down voltage to 5V. Less power loss.

So is this safe? Only time will tell. :)
And 5V pin on Arduino is for powering LED Display / Matrix.

This is a true work of DIY genius. You’ve made a very challenging project accessible and a source of real learning. The details you provide are so precise and such good craftsmanship that a person new to wood or electronics would be able to do them. I’m definitely going to do it with my grandson. There is such power for a child in connecting a his or her spoken word with the visible word.

So it’s perfect as is. But I have two questions about modifications. I’m not asking you to do them, just to advise on whether they are relatively doable extensions of this project or might contain non-obvious challenges. One is to make the display larger either with additional panels or a longer panel so a whole longer word could be visible at once. The other is to have, I guess, 2 modes, one of which maybe stops and holds the word until you say the next word, so the child can really absorb what it looks like.

Reply 3 years ago

Thank you for the kind words, I am glad you liked it.

Yes, you can extend panel that it would be longer. You additionally need to change this line: int maxInUse = 2;
By the number you define how many displays you will use.