Introduction: 8x8 Matrix Display With BT
I purchased a 4 panel 8x8 matrix from Ebay (China) a few months ago.
I was a tad disappointed when I realised it was hard wired side to side, not top to bottom for which most of the examples on the Net are written! See step 2.
I guess I could have modified the code (not sure how), but my usual laziness told me to look for something already written. I came across an example and stuck with it!
I played with fixed messages but then I decided I'd try programming the message via Bluetooth.
Then I wanted to save and retrieve messages !
There was a lot of trial and error but after a few hours coding I got it working.
I am still trying to find a practical use for it !! :-)
Step 1: The Display
As previously mentioned, the display is wired left to right, rather than top to bottom.
I'm sure other code could have been modified to compensate for this !
I don't remember where I downloaded the working code from, however, a search for "cosmicvoid matrix or LedControlMS.h" may help. The LedControlMS.h lib is required for this project.
The only part of this code I modified was the number of displays as it looks like it was set to 5, I just changed it to 4.
I have ordered another x4 display so I can see how it works with 8 matrices rather than 4!
Step 2: The Bluetooth Bit
Each time I play with a Bluetooth device, I always refer to this excellent instructable !
https://www.instructables.com/id/Modify-The-HC-05-B...
This Instructable will tell you all you need to know on how to set up and pair the HC-05 to a mobile phone or tablet.
I paired with a Samsung Galaxy 6 Edge and a Tab A with no problem.
I did alter the communication speed to 57600.
Step 3: BT Communication and the Program.
To communicate with the HC-05 I downloaded a free App from the Play Store, there a several available,- the one I chose is called Bluetooth Terminal HC-05 - it's an excellent App!
Once you have paired the HC-05 to a phone or tablet The following occurs.
When the arduino is reset, the program reads all of the messages stored in the EEPROM and displays them on the phone / tablet - see picture.
The information displayed is the Mem Location (0-9), Length of Message & the Message itself at each location.
I arranged the code to store up to a 90 character message at address 5 for Msg 0, 105 for Msg 1 .......905 for Msg 9.
Address 0, 100 .... 900 contain the message length.
The last stored / retieved message is displayed.
Sending anything to the Arduino via BT replaces the current message.
To store the displayed message (use "~" tilde), send ~0 to store at location 0, ~5 to store at location 5 etc.
To retrieve and display a stored message use "^" (carat), eg ^3 will load and display the message at Mem location 3.
When a message is stored or retrieved, the current memory location is stored at EEPROM address 1023 - this is used at power up to display the last message displayed.
Step 4: The Code & Power
As per usual, my code is a tidy as a teenagers bedroom, but I have lots of comments in there !
There may be some superfluous code as there was a bit of trial and error.
The display routine will display whatever is in array msg[]. The font is not complete so displaying some characters will cause unpredictable results !
If someone out there could tell me how to modify the $ sign for the £ sign or better still add it, then I would be extremely grateful!
It may be necessary to hard code a message into location 0 just to give a starting point, this can be overwritten when the program is up and running!
eg
EEPROM.write(0,'5'); // length of msg stored at location 0
EEPROM.write(5,'L'); //msg stored at location 05
EEPROM.write(6,'o');
EEPROM.write(7,'c');
EEPROM.write(8,' ');
EEPROM.write(9,'0');
With no messages stored, on power up, the display will be unpredictable and the phone / tablet will display odd but consistent information because, as with most EEPROM's, the default data at every location is FF Hex (225 Decimal).
This prototype was built using an Arduino Uno, but I will use a pro mini for the finished project.
I intend to use 3 x 1.5v batteries, so to save power, I will turn off the HC-05 after selecting a message. Just disconnecting/reconnecting the power is not good enough as it will send garbled information to the display.
It would seem necessary to isolate the TR & RX pins before connecting / disconnecting the power!
Attachments
Step 5: Update 2020 - 2 X 4 (8x8) Matrix Displays
After a better understanding of the MAX7219, I have managed to link 2 displays together!
there were just a couple of lines of code which needed changing - see attached ino.
Attachments

Participated in the
LED Contest
18 Comments
Question 4 years ago on Step 1
i am not able to get the library file LedControlMS.h can anyone help me regarding this
Answer 4 years ago
Hi, try
Github.com/shaai/Arduino_Led_matrix_sketch
Kind regards
Terry
4 years ago
when the program is uploaded each display (I used 4 of them) shows same text...I mean, each display scrolls independently .
Reply 4 years ago
Hi, I'm sorry, I don't understand !
Can you send some images please ?
5 years ago
Hi, how to make it work with 8 matrix display/s? It doesn't work properly even if I change # of displays to 8 in a code! Can you help me please?
6 years ago
SUPERB. It worked flawlessly :-). Thanks for making such a nice instructable.
Reply 6 years ago
Hi, thank you for your comments, I am really pleased you have it working.
7 years ago
can not get it to work
also get a message that i have low memory
and i dont get tor understand the pin out.
my bluetooth works on the phone and can connect.
but sinds i uploaded the code plus librairy, the matrix is dead. NOTHING pleace explain the pins in the code ( witch 3 pins AS CODE need to be from matrix to the UNO and witch from the bluetooth (RX TX ) must the go to pin 4 and 5 ? i have. and i use the HC-06 Terry
Reply 7 years ago
Hi
I think the display is blank because there is NO data in the eeprom!
I made the project again with HC-06 and it works fine :-)
First of all, copy these 8 lines of code and paste them AFTER the line
BTSerial.flush();
EEPROM.write(1023,4);
EEPROM.write(400,7);
EEPROM.write(405,'L');
EEPROM.write(406,'o');
EEPROM.write(407,'c');
EEPROM.write(408,' ');
EEPROM.write(409,'4');
msgsize=5;
Recompile & upload the program to your Arduino.
When uploaded, the display should show 'Loc 4'
Now delete the 8 lines of code or /* rem them out */ as you only need to run this once. Re compile and upload the code again.
The display should still display Loc 4.
If your Bluetooth is connected correctly, you should see some strange characters on your android phone display ! (see image).
The display connections are :- 5v & Gnd (0v)
Arduino pin 8 to LCD DIN
Arduino pin 9 to LCD CS
Arduino pin 10 to LCD CLK
The Bluetooth connections are :-
BT Rx to Arduino Pin 5 & BT Tx to Arduino pin 4
ALSO, you may have to change
BTSerial.begin(57600); to BTSerial.begin(9600); - as the HC-06 default is 9600
I hope this helps
Good luck :-)
Reply 7 years ago
and how to test this code of you
becous there is already text in it, i want to see it on the matrix.
must i send by btooth (same app as you ) a command? if yes how and what.
i seen your picture here but can not make out of it anything.
YEP WannaDuino. (he thinks he knows it , so he acts he`s know it.(thats ME)
7 years ago
is definitely a fote wordy, but how to conect using a HC-06 and must there be any changes?
Reply 7 years ago
Hi
I have never used HC-06, so I have no experience or knowledge :-(
this instructable should help
https://www.instructables.com/id/Add-bluetooth-to-y...
kind regards
Terry
Reply 7 years ago
this is realy funny,
i also have gone yesterday to that IBLE also of the ON OFF led
and ( I MADE IT ) also with use of PC and with your app on android phone.
but now i want it to connect the matrix
and the HC-06 is only a SLAVE mode device. can only recieve and the HC-05 is a TRANSCIEVER. it can do both. if i am correct.
but Terry you got my fote. just did it. i wil put my pictures here and i hope i also can say here. ( I MADE IT ) with help of Terry.
greetings from WannaDuino. nice name eeh. i am a Wannabe Arduino.( and is it good or not)
Reply 7 years ago
Its a GREAT Name :-) :-)
it looks like you are correct, HC-06 is receive only.
In theory, this should still work with one exception - on power up the EEPROM contents are read and sent to the mobile phone, this will not happen, however, it should still update the display as the Arduino is receiving the information !
You may have to comment out any line starting with BTSerial.println, but it should work !
Good luck
Reply 7 years ago
Hi
I purchased an HC-06 ! I have tested it with arduino and android. I can send & receive messages both ways ! Therefore, my previous statement ,'the HC-06 is receive only' is totally incorrect!
The sketch should run with either HC-05 or HC-06 !
Apologies for the confusion. - Let me know how you get on :-)
kind regards
Terry :-)
Reply 7 years ago
Dear mr Terry,
thank you so mutch, to do al that extra work and your efford for me and the rest.
that`s why my hart go`s out to INSTRUCTABLES. Because we help each other is it possible for you to make a simple info sheet or so that i can make it like you (so i can put my own text in it ) in your own sketch? i also just MADE the door alarm, using the ESP-8266 (07) wifi chip board. man that was a BLAST. so cooooool when i remove (open the door) the magnet.
its send me an email. that the door has bin opend by internet. yesssssssssssssssss happyyyyyyyyyyyy WannaDuinomr Terry and also a cheap item of only 2 USD unbelieveble, this was put here on INSTRU, by a very smart man from Mexico named ClemRz's. and you know i am a beginner, and all what can go wrong happend to me, but i DID IT.
Reply 7 years ago
Re the ESP-8266 Door Alarm - That is brilliant !!!
Many things can, and do go wrong, even to experienced people! It is great that you did not give up - well done !!
There is great satisfaction when a project finally works :-) :-)
I used the ESP-8266 in my 'Milk in Fridge' Instructable over a year ago & it is still working !! I can go to www.thingspeak.com and see how much milk I have when I am shopping !
Re the Matrix display.
If I understand you correctly, you would like to display your own messages on the display ! This is simple :-)
Enter any message. When it is in the display, send the "~" character followed by a number 0 to 9, for example, Enter the message **INSTRUCTABLES** and see it on the display.If you now enter ~3 (for example) the message **INSTRUCTABLES** will be stored in memory location 3.
~5 will store it in memory location 5 !
So whatever is currently displayed can be stored using this method.
To recall the message, use the "^" symbol for example, ^5 will load and display the message stored at memory location 5.
I hope this helps :-)
have fun
Terry :-)
7 years ago
but now i must try to use the HC-06 to implement it in this tutorial, soi can also say I MADE IT. here
lets do this Terry.are you in or not. and take a look here pleace. is for you.
https://www.instructables.com/id/Add-bluetooth-to-y...