strange flashing of other colors

Hi,

I've written a program (C++) that sends 8 times per second a new pattern to the blinky tape.
While setting the values, I explicitly set for 255s in the color-stream and I also verified it during the send-to-the-device phase that I do not accidently send the magical 255. So, only 255 at the end.
What I now see is strange blinking of other colors than what I send. As if something else in the blinky tape is also sending colors. For example a couple of blue or green pixels - and I'm only sending shades of red (verified that by dumping the bytes I send to the tape in hex on the console).
This only happens when the program is running.
I verified that no other program is using the serial port (using lsof (running Linux here)).
This happens on raspberry pies, on a regular laptop and on an udoo embedded system.
This problem is not related to the one mentioned in http://forums.blinkinlabs.com/index.php?p=/discussion/70/need-help-diagnosing-failure-with-linux-closed - it indeed fixed that stalling problem but not the color-flashing.

Any suggestions?

Comments

  • If I only give the first led a red-color, it occasionally switches to blue and the second led is blinking all kinds of colors. Note: in this test only the first led got a color, all others (including the second led) were set to value 0x00,0x00,0x00.
  • Hey flok,

    This is interesting, and I don't think we've heard of this issue before.

    So you're doing everything direct, sending values out over serial with custom C++ code? If that's the case, my guess is that something is getting out of sync somehow...(there could always be a bug in our firmware, but it hasn't been reported elsewhere.)

    Also - you might have seen this elsewhere - but it's possible to overload the serial stack on the BlinkyBoard controller by sending it too much data. In our Processing library, we send the data something like 40 bytes at a time to avoid that.
  • What do you mean at a time? Do I need to insert a sleep? How long should this sleep be?

    It's all custom C++ code yes, used in other applications.

    thanks
  • edited March 2014
    Got it. Yes, a few bytes at a time, then do the write to the serial port, then a very short sleep...probably best to just have a look the code: https://github.com/Blinkinlabs/BlinkyTape_Processing/blob/master/examples/DiscoParty/BlinkyTape.pde
  • Yes, I can confirm that with a sleep of 1ms every 45 bytes all runs fine.
  • Awesome, good to hear!
Sign In or Register to comment.