Colorduino RGB matrix development board (HCDVBD0015)
Re: Colorduino RGB matrix development board (HCDVBD0015)
Greetings!
"Hello_World.cpp" for me worked perfectly but "Hello_World_Using_HCTimer2" did not light anything in the Matrix;
I would also like to know how to link several Colorduino together to display text; Thanks for the code
"Hello_World.cpp" for me worked perfectly but "Hello_World_Using_HCTimer2" did not light anything in the Matrix;
I would also like to know how to link several Colorduino together to display text; Thanks for the code
Re: Colorduino RGB matrix development board (HCDVBD0015)
It looks like the while(1) line is being optimised out causing the print line to be repeatedly run. The library and sketches are quite old now so my guess is something has changed it in a recent version of the Arduino IDE to break the sketch. I've fixed the problem simply by moving the print line to the setup() section so it's only run once then removed the while() function. See updated sketch in first post.
You would need to program each board separately and then use either the serial interface or I2C interface to send serial commands to and from each board to synchronize them with one another. So for instance you could send a serial command to each board to trigger when to start automatic scrolling with each one being offset by one character, or use the DisplayPos(Position) function to directly control what part of the text string is displayed and then send the position for each board via the serial port.I would also like to know how to link several Colorduino together to display text;
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Colorduino RGB matrix development board (HCDVBD0015)
Greetings andrew! First, thanks for the reply, my friend!
Sorry, my knowledge is very little about it and I do not understand.
If you could, for goodness, explain to me, I have 2 Colorduinos and would like to write a scrolling message, for example, Happy Easter;
How would I do this in the code you posted (Hello_World)?
Thanks again
Sorry, my knowledge is very little about it and I do not understand.
If you could, for goodness, explain to me, I have 2 Colorduinos and would like to write a scrolling message, for example, Happy Easter;
How would I do this in the code you posted (Hello_World)?
Thanks again
Re: Colorduino RGB matrix development board (HCDVBD0015)
I'm afraid what you're trying to do would be too complicated to explain in one post but my first suggestion is that what you are tying to do would be too complicated using the auto scroll feature of the library. So I would suggest turning this feature off with the HCColorDuino.ScrollOff() library function and manually setting the position of your message on the module with the HCColorDuino.DisplayPos(Position) function.
You can find more information about these two library functions in the first post of this thread:
http://forum.hobbycomponents.com/viewto ... =58&t=1675
If you can master the DisplayPos() function you can move on from there.
You can find more information about these two library functions in the first post of this thread:
http://forum.hobbycomponents.com/viewto ... =58&t=1675
If you can master the DisplayPos() function you can move on from there.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Colorduino RGB matrix development board (HCDVBD0015)
Greetings andrew!
I had paused a little on the subject but I woke up again.
So in the sketch I do this: HCColorDuino.ScrollOff () to turn off automatic scrolling; and add: HCColorDuino.DisplayPos (Position); no sketch.
But what I put in (Position) being that I want to use 2 or 3 Colorduino and write a phrase, for example, Merry Christmas. Could you please give me an example?
Thank you very much
I had paused a little on the subject but I woke up again.
So in the sketch I do this: HCColorDuino.ScrollOff () to turn off automatic scrolling; and add: HCColorDuino.DisplayPos (Position); no sketch.
But what I put in (Position) being that I want to use 2 or 3 Colorduino and write a phrase, for example, Merry Christmas. Could you please give me an example?
Thank you very much
Re: Colorduino RGB matrix development board (HCDVBD0015)
Sorry, I probably didn't make my suggestion clear enough in my last post. What you are wanting to do is fairly complicated for someone that is new to programming. I would suggest breaking the task up into a series of simpler steps. The first of which is understanding what the HCColorDuino.DisplayPos() actually does. I've modified the example sketch so that it turns off auto scrolling and allows you to manually set the position of the text using the HCColorDuino.DisplayPos() function. I would suggest uploading the sketch below and then changing the value part of 'Position = 8;' to understand how that sets the position of the displayed text.
Once you understand what HCColorDuino.DisplayPos() does then try the sketch below that adds a for loop to increment the value in Position which should make the text scroll:
Again try to understand what the above sketch is now doing. The difference between using the HCColorDuino.DisplayPos() function instead of auto scrolling is that now you always know the current position of the text which is stored in the Position variable. This is the value you will need to pass on to your next module using either the serial UART or I2C interface so that the next module knows what part of the text it should be displaying. This is the difficult part as it's not something the library can do so you'll need to figure out how to pass numbers between Arduino boards yourself and I would suggest treating it as a separate task.
Code: Select all
#include <HCTimer2.h>
#include "HCColorDuino.h"
HCColorDuino HCColorDuino;
volatile unsigned int Position = 8;
void setup()
{
HCTimer2Init(T2_CLK_DIV_256, 150);
HCColorDuino.RGBColourCorrection(25, 63, 63);
HCColorDuino.SetFontFG(0,0,255);
HCColorDuino.SetFontBG(0,0,0);
HCColorDuino.ScrollOff();
HCColorDuino.print("HELLO WORLD!");
}
void loop()
{
HCColorDuino.DisplayPos(Position);
while(1);
}
void HCTimer2()
{
HCColorDuino.Refresh();
}
Once you understand what HCColorDuino.DisplayPos() does then try the sketch below that adds a for loop to increment the value in Position which should make the text scroll:
Code: Select all
#include <HCTimer2.h>
#include "HCColorDuino.h"
HCColorDuino HCColorDuino;
unsigned int Position;
void setup()
{
HCTimer2Init(T2_CLK_DIV_256, 150);
HCColorDuino.RGBColourCorrection(25, 63, 63);
HCColorDuino.SetFontFG(0,0,255);
HCColorDuino.SetFontBG(0,0,0);
HCColorDuino.ScrollOff();
HCColorDuino.print("HELLO WORLD!");
}
void loop()
{
for(Position = 0; Position < 104; Position++)
{
HCColorDuino.DisplayPos(Position);
delay(100);
}
}
void HCTimer2()
{
HCColorDuino.Refresh();
}
Again try to understand what the above sketch is now doing. The difference between using the HCColorDuino.DisplayPos() function instead of auto scrolling is that now you always know the current position of the text which is stored in the Position variable. This is the value you will need to pass on to your next module using either the serial UART or I2C interface so that the next module knows what part of the text it should be displaying. This is the difficult part as it's not something the library can do so you'll need to figure out how to pass numbers between Arduino boards yourself and I would suggest treating it as a separate task.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Colorduino RGB matrix development board (HCDVBD0015)
You have a 'good heart' to have that patience with me! Thank you for that!
I understand what you have explained to me, but, incredible as it may seem, I still can not understand what I should put, for example, in the second code that you showed me, (which is simpler than the original code) to connect two colorduino the phrase "HELLO".
If you do not want to waste time with me, I'll still be very grateful!
Daniel
I understand what you have explained to me, but, incredible as it may seem, I still can not understand what I should put, for example, in the second code that you showed me, (which is simpler than the original code) to connect two colorduino the phrase "HELLO".
If you do not want to waste time with me, I'll still be very grateful!
Daniel
Re: Colorduino RGB matrix development board (HCDVBD0015)
As I say, unfortunately this part is not supported by the library so I'm afraid I cannot help with that other than pointing you in the right direction. The only thing I can suggest is you treat passing a value from one Arduino (colourduino) to another as a separate leaning exercise and then when you've figured that out try to implement into the above example sketch. Try googling something like 'How to send numbers from one Arduino to another'.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Colorduino RGB matrix development board (HCDVBD0015)
Hey Team,
I think I figured out a way for you to 'pass' scrolling between daisy chained units without having to learn how to pass position variables between dasiy chained units (that sounds like a super painful challenge).
My approach basically 'offsets' the starting pixels for additional units, and 'offsets' the ending pixels for additional units.
Using the 'hello world!' sketch as an example (leading and trailing character font kerning is important):
I think I figured out a way for you to 'pass' scrolling between daisy chained units without having to learn how to pass position variables between dasiy chained units (that sounds like a super painful challenge).
My approach basically 'offsets' the starting pixels for additional units, and 'offsets' the ending pixels for additional units.
Using the 'hello world!' sketch as an example (leading and trailing character font kerning is important):
- Create two copies of your sketch: Add a trailing space ("HELLO WORLD! "); to the first sketch, and a leading space
HCColorDuino.print(" HELLO WORLD!"); to the second sketch. - Using the example of the 'hello world' sketch, change the 'less than' position from 104 to 107. This handles the kerning of the very thin exclamation mark. (you could also have lead character issues i suspect)
- Upload the first sketch to your first unit, the second sketch to the second unit.
- Connect the two units.
- Reboot the circuit.
You do not have the required permissions to view the files attached to this post.
Re: Colorduino RGB matrix development board (HCDVBD0015)
MrNoTip wrote: ↑Mon May 18, 2020 2:31 pmHey Team,
I think I figured out a way for you to 'pass' scrolling between daisy chained units without having to learn how to pass position variables between dasiy chained units (that sounds like a super painful challenge).
My approach basically 'offsets' the starting pixels for additional units, and 'offsets' the ending pixels for additional units.
Using the 'hello world!' sketch as an example (leading and trailing character font kerning is important):
- Create two copies of your sketch: Add a trailing space ("HELLO WORLD! "); to the first sketch, and a leading space
HCColorDuino.print(" HELLO WORLD!"); to the second sketch.- Using the example of the 'hello world' sketch, change the 'less than' position from 104 to 107. This handles the kerning of the very thin exclamation mark. (you could also have lead character issues i suspect)
- Upload the first sketch to your first unit, the second sketch to the second unit.
- Connect the two units.
- Reboot the circuit.
daisy.jpg
Each string of text will be different (slowing the delays from 100 to 1000 will help you pin point any cross screen jumps) but I reckon this might make someone's day - it certainly made mine!
Hmmm...seems subsequent loops lose sync. I am sure its surmountable!