forum.hobbycomponents.com
http://forum.hobbycomponents.com/

Colorduino RGB matrix development board (HCDVBD0015)
http://forum.hobbycomponents.com/viewtopic.php?f=64&t=1676
Page 2 of 2

Author:  jasiel [ Sat Nov 25, 2017 8:21 pm ]
Post subject:  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

Author:  andrew [ Mon Nov 27, 2017 11:58 am ]
Post subject:  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.

Quote:
I would also like to know how to link several Colorduino together to display text;


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.

Author:  jasiel [ Thu Jan 18, 2018 8:46 pm ]
Post subject:  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

Author:  andrew [ Fri Jan 19, 2018 4:52 pm ]
Post subject:  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:

viewtopic.php?f=58&t=1675

If you can master the DisplayPos() function you can move on from there.

Author:  jasiel [ Sun Jul 08, 2018 8:07 pm ]
Post subject:  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

Author:  andrew [ Tue Jul 10, 2018 2:43 pm ]
Post subject:  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.




Code:
#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:
#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.

Author:  jasiel [ Fri Jul 13, 2018 2:05 am ]
Post subject:  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

Author:  andrew [ Mon Jul 16, 2018 9:28 am ]
Post subject:  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'.

Page 2 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/