Problem with NeoPixel 8X8 Matrix
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88145
- Joined: Sat Feb 07, 2009 10:11 am
Re: Problem with NeoPixel 8X8 Matrix
What program are you using to send data? Is it always sending a 255 before each number command?
- Maximvs
- Posts: 12
- Joined: Sat Apr 29, 2017 4:18 am
Re: Problem with NeoPixel 8X8 Matrix
Yes of course.... C# code....if i send data without blink , everything works perfect!...When i send blink loop...when i change values...not work.
- adafruit_support_bill
- Posts: 88145
- Joined: Sat Feb 07, 2009 10:11 am
Re: Problem with NeoPixel 8X8 Matrix
Please post the code.
- Maximvs
- Posts: 12
- Joined: Sat Apr 29, 2017 4:18 am
Re: Problem with NeoPixel 8X8 Matrix
if (BriCHK.Checked == true)
{
serialData2[0] = 255;
serialData2[1] = Convert.ToByte(flagdebug);
serialData2[2] = Convert.ToByte(flagInt);
_sp5.Write(serialData2, 0, 3);
}
and then i send different values
private void BlueCheck_Click_1(object sender, EventArgs e)
{
flagdebug = 1;
}
private void YellowCheck_Click(object sender, EventArgs e)
{
flagdebug = 2;
}
private void RedCheck_Click(object sender, EventArgs e)
{
flagdebug = 3;
}
... e.t.c
{
serialData2[0] = 255;
serialData2[1] = Convert.ToByte(flagdebug);
serialData2[2] = Convert.ToByte(flagInt);
_sp5.Write(serialData2, 0, 3);
}
and then i send different values
private void BlueCheck_Click_1(object sender, EventArgs e)
{
flagdebug = 1;
}
private void YellowCheck_Click(object sender, EventArgs e)
{
flagdebug = 2;
}
private void RedCheck_Click(object sender, EventArgs e)
{
flagdebug = 3;
}
... e.t.c
- adafruit_support_bill
- Posts: 88145
- Joined: Sat Feb 07, 2009 10:11 am
Re: Problem with NeoPixel 8X8 Matrix
You are sending three bytes, but only reading two. It is not clear what the value of flagint is, but it looks like you will lose at least one command before you re-sync with the next 255.
- Maximvs
- Posts: 12
- Joined: Sat Apr 29, 2017 4:18 am
Re: Problem with NeoPixel 8X8 Matrix
i change it but same results....This problem appears only when blink is set....if i send values 1,2,3,4 e.t.c matrix works perfect....is it weird?
- adafruit_support_bill
- Posts: 88145
- Joined: Sat Feb 07, 2009 10:11 am
Re: Problem with NeoPixel 8X8 Matrix
Hard to say looking at only a fragment of the code. If you are sending commands continuously, it will take a while to work through the input buffer with the delays in your blinking code.
- Maximvs
- Posts: 12
- Joined: Sat Apr 29, 2017 4:18 am
Re: Problem with NeoPixel 8X8 Matrix
yes i see....is there any other way to blink a matrix without delays?....with a timer maybe when values is change?....
- adafruit_support_bill
- Posts: 88145
- Joined: Sat Feb 07, 2009 10:11 am
Re: Problem with NeoPixel 8X8 Matrix
You can use the millis() function for timing: https://learn.adafruit.com/multi-taskin ... for-timing
Please be positive and constructive with your questions and comments.