leighmurray / boblight

Automatically exported from code.google.com/p/boblight
GNU General Public License v3.0
0 stars 0 forks source link

LEDs do not light on, Windows7, TLC5940 #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Double click boblightd.exe -ok! -> Arduino Mega 2560 starts blinking
2. Double click boblight-getpixel -ok!
3. Leds do not light on:(

The .exes gives not output (black cmd windows). I think its normal.

Arduino Mega 2560 with two TLC5940 (.pde: 
http://code.google.com/p/boblight/source/browse/trunk/arduino/boblight_arduino_t
lc5940/boblight_arduino_tlc5940.pde?r=381)

boblight.conf (http://pastebin.com/suAH5baQ)

In ubuntu the same problem. I start boblightd & boblight-x11 and LEDs do not 
light on too. After i reupload this code: http://pastebin.com/hXsMGsAt the LED 
getting on. In windows i cant reupload the code, because he says: Com Port is 
used, Close Boblightd.exe

Please help me! Im almost at finish.
Greetings from Germany :)

Original issue reported on code.google.com by thesensa...@gmail.com on 28 Oct 2012 at 7:56

GoogleCodeExporter commented 9 years ago
That's because the arduino firmware is not compatible with that version of 
boblight, the WaitForPrefix() function needs to be changed to accept the FF 
prefix.

Original comment by bob.loo...@gmail.com on 28 Oct 2012 at 11:46

GoogleCodeExporter commented 9 years ago
My Arduio Mega 2560 work with the ATmega16U Chip and Firmware rev.0001. Can it 
work with boblight?
If yes, how i must change the .conf and the .pde?
My actually configs are: 
boblight.conf: http://pastebin.com/ngJY1u5q
arduino.pde: http://pastebin.com/CxfHFEgv

If i try it without the prefix and upload the .pde, all Led are getting on, but 
when i start boblightd.exe they switch off..

Original comment by thesensa...@gmail.com on 29 Oct 2012 at 1:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Change the WaitForPrefix() function into this:

void WaitForPrefix()
{
  uint8_t first = 0;
  while (first != 0xFF)
  {
    while (!Serial.available());
    first = Serial.read();
  }
}

Original comment by bob.loo...@gmail.com on 30 Oct 2012 at 6:04

GoogleCodeExporter commented 9 years ago
The same problem :( 
I changed the prefix in the boblightd.conf to FF and the .pde WaitForPrefix() 
to FF. Nothing happen again.
Can it be, that my Arduino 2560 wit ATmega 16U is not compatible to 
boblightd.exe?
Or something in my .pde code is wrong?

#include "Tlc5940.h"

void setup()
{
  Tlc.init();
  Serial.begin(115200);
}

void loop()
{
  WaitForPrefix();

  for (int i = 0; i < NUM_TLCS * 16; i++)
  {
    //read out two bytes for each channel, big endian
    while(!Serial.available());
    uint16_t out = Serial.read() << 8;
    while(!Serial.available());
    out |= Serial.read();
    //set the tlc5940 channel to the read value
    Tlc.set(i, out);
  }
  Tlc.update();
}

//boblightd needs to send 0x55 0xAA before sending the channel bytes
void WaitForPrefix()
{
  uint8_t first = 0;
  while (first != 0xFF)
  {
    while (!Serial.available());
    first = Serial.read();
  }
}

Original comment by thesensa...@gmail.com on 30 Oct 2012 at 6:37

GoogleCodeExporter commented 9 years ago
Any Idea?

Original comment by thesensa...@gmail.com on 1 Nov 2012 at 5:16