loading

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!

<p>i did it, its working.</p><p>now i have to learn how to save messages and recal them.</p><p>And dear friend, are you further with the project?</p><p>i am so greatful for your help. thank you so much, without u sir, i could not have done it.</p><p>First it was al rubbish, or not working, so i ad the lines you told. ( whoooow ) how you come up with that ) it almost worked after that,,becous the loc4 code was displayed.</p><p>but stil rubbish on the matrix. Then i remember you saying somthing about the BAUTRATE, and yes that was good i think, but it was the arduino`s rate, i looked in the code, and YES the Bluetooth was stil in a higher rate. thanx for that also. hahahah</p><p>no i am realy happy, now learn to mem al, in the matrixes.</p><p>do you got some tips??</p><p>WannaDuino!!!</p><p>WannaDuino!!!</p>
<p>can not get it to work</p><p>also get a message that i have low memory</p><p>and i dont get tor understand the pin out.</p><p>my bluetooth works on the phone and can connect.</p><p>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</p>
<p>Hi</p><p>I think the display is blank because there is NO data in the eeprom!</p><p>I made the project again with HC-06 and it works fine :-)</p><p>First of all, copy these 8 lines of code and paste them AFTER the line</p><p>BTSerial.flush();</p><p>EEPROM.write(1023,4);</p><p>EEPROM.write(400,7);</p><p>EEPROM.write(405,'L');</p><p>EEPROM.write(406,'o');</p><p>EEPROM.write(407,'c');</p><p>EEPROM.write(408,' ');</p><p>EEPROM.write(409,'4');</p><p>msgsize=5;</p><p>Recompile &amp; upload the program to your Arduino.</p><p>When uploaded, the display should show 'Loc 4'</p><p>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.</p><p>The display should still display Loc 4.</p><p>If your Bluetooth is connected correctly, you should see some strange characters on your android phone display ! (see image).</p><p>The display connections are :- 5v &amp; Gnd (0v)</p><p>Arduino pin 8 to LCD DIN</p><p>Arduino pin 9 to LCD CS</p><p>Arduino pin 10 to LCD CLK</p><p>The Bluetooth connections are :-</p><p>BT Rx to Arduino Pin 5 &amp; BT Tx to Arduino pin 4</p><p>ALSO, you may have to change</p><p>BTSerial.begin(57600); to BTSerial.begin(9600); - as the HC-06 default is 9600</p><p>I hope this helps </p><p>Good luck :-)</p>
<p>and how to test this code of you</p><p>becous there is already text in it, i want to see it on the matrix.</p><p>must i send by btooth (same app as you ) a command? if yes how and what.</p><p> i seen your picture here but can not make out of it anything.</p><p>YEP WannaDuino. (he thinks he knows it , so he acts he`s know it.(thats ME)</p>
<p>is definitely a fote wordy, but how to conect using a HC-06 and must there be any changes? </p>
<p>Hi</p><p>I have never used HC-06, so I have no experience or knowledge :-(</p><p>this instructable should help</p><p><a href="https://www.instructables.com/id/Add-bluetooth-to-your-Arduino-project-ArduinoHC-06/" rel="nofollow">https://www.instructables.com/id/Add-bluetooth-to-y...</a></p><p>kind regards</p><p>Terry</p>
<p>this is realy funny, </p><p>i also have gone yesterday to that IBLE also of the ON OFF led</p><p>and ( I MADE IT ) also with use of PC and with your app on android phone.</p><p>but now i want it to connect the matrix</p><p>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.</p><p>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.</p><p>greetings from WannaDuino. nice name eeh. i am a Wannabe Arduino.( and is it good or not)</p>
<p>Its a GREAT Name :-) :-)</p><p>it looks like you are correct, HC-06 is receive only.</p><p>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 !</p><p>You may have to comment out any line starting with BTSerial.println, but it should work !</p><p>Good luck</p>
<p>Hi</p><p>I purchased an HC-06 ! I have tested it with arduino and android. I can send &amp; receive messages both ways ! Therefore, my previous statement ,'the HC-06 is receive only' is<strong> totally incorrect</strong>!</p><p>The sketch should run with either HC-05 or HC-06 !</p><p>Apologies for the confusion. - Let me know how you get on :-)</p><p>kind regards</p><p>Terry :-)</p>
<p>Dear mr Terry,</p><p>thank you so mutch, to do al that extra work and your efford for me and the rest.</p><p>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.</p><p>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 <a href="https://www.instructables.com/member/ClemRz/" rel="nofollow">ClemRz's</a>. and you know i am a beginner, and all what can go wrong happend to me, but i DID IT.</p>
<p>Re the ESP-8266 Door Alarm - That is brilliant !!!</p><p>Many things can, and do go wrong, even to experienced people! It is great that you did not give up - well done !!</p><p>There is great satisfaction when a project finally works :-) :-)</p><p>I used the ESP-8266 in my 'Milk in Fridge' Instructable over a year ago &amp; it is still working !! I can go to <a href="http://www.thingspeak.com" rel="nofollow"> www.thingspeak.com </a> and see how much milk I have when I am shopping !</p><p>Re the Matrix display.</p><p>If I understand you correctly, you would like to display your own messages on the display ! This is simple :-)</p><p>Enter any message. When it is in the display, send the &quot;~&quot; 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. </p><p>~5 will store it in memory location 5 !</p><p>So whatever is currently displayed can be stored using this method.</p><p>To recall the message, use the &quot;^&quot; symbol for example, ^5 will load and display the message stored at memory location 5.</p><p>I hope this helps :-)</p><p>have fun</p><p>Terry :-)</p>
<p>but now i must try to use the HC-06 to implement it in this tutorial, soi can also say I MADE IT. here</p><p>lets do this Terry.are you in or not. and take a look here pleace. is for you.</p><p><a href="https://www.instructables.com/id/Add-bluetooth-to-your-Arduino-project-ArduinoHC-06/" rel="nofollow">https://www.instructables.com/id/Add-bluetooth-to-y...</a></p>

About This Instructable

3,138views

55favorites

License:

More by samsungite:4 in a Row / Connect 4 7 Segment Clock With Alarm & Temperature DS1307 RTC I2C Very Simple 
Add instructable to: