- April 27, 2009
- 778
- 333
- 31
- Home Country
- Netherlands
I am busy with a new setup for my new TV, but I run into some problems. This is the setup:
- SainSmart UNO R3
- AtmoDuino firmware with FastLed 3.0.3
- Serial port on 115200
- 64 leds
- AtmoWin 1.0.0.8
- AtmoLight 1.14
What goes wrong:
I have the idea that serial data lets the Arduino crash, because this problem only occurs with the AtmoDuino code. Sometimes it reboots, the other time it just doesn't respond. I can reproduce this every time when playing with the static color or software adjustment sliders. To let it run again, I have to press the reset button on the Arduino. It runs fine when not changing mode or doing this, so no problems occur when not touching AtmoWin and just let it run whatever it does.
Also, AtmoLight can't connect to AtmoWinA.exe, because it lets AtmoWin crash.
So there are 2 problems:
- The Arduino crashes when playing with color sliders and sometimes when changes mode
- AtmoWin crashes when AtmoLight starts
Also, when I do this: AtmoWinA.exe /register, it gives an error: RegisterTypeLib failed. Code:0x8002801c
Someone knows what's going on?
This is the error AtmoLight produces in MP:
- SainSmart UNO R3
- AtmoDuino firmware with FastLed 3.0.3
- Serial port on 115200
- 64 leds
- AtmoWin 1.0.0.8
- AtmoLight 1.14
What goes wrong:
I have the idea that serial data lets the Arduino crash, because this problem only occurs with the AtmoDuino code. Sometimes it reboots, the other time it just doesn't respond. I can reproduce this every time when playing with the static color or software adjustment sliders. To let it run again, I have to press the reset button on the Arduino. It runs fine when not changing mode or doing this, so no problems occur when not touching AtmoWin and just let it run whatever it does.
Also, AtmoLight can't connect to AtmoWinA.exe, because it lets AtmoWin crash.
So there are 2 problems:
- The Arduino crashes when playing with color sliders and sometimes when changes mode
- AtmoWin crashes when AtmoLight starts
Also, when I do this: AtmoWinA.exe /register, it gives an error: RegisterTypeLib failed. Code:0x8002801c
Someone knows what's going on?
This is the error AtmoLight produces in MP:
Code:
[2014-12-18 12:38:19,035] [Error ] [AtmoLight Initialise] [ERROR] - AtmoLight: AtmoWinHandler - Error with GetAtmoRemoteControl!
[2014-12-18 12:38:19,056] [Error ] [AtmoLight Initialise] [ERROR] - AtmoLight: AtmoWinHandler - Exception: Ongeldige klassereeks (Uitzondering van HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
[2014-12-18 12:38:20,177] [Error ] [AtmoLight Reinitialise] [ERROR] - AtmoLight: AtmoWinHandler - Error with GetAtmoRemoteControl!
[2014-12-18 12:38:20,177] [Error ] [AtmoLight Reinitialise] [ERROR] - AtmoLight: AtmoWinHandler - Exception: Ongeldige klassereeks (Uitzondering van HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
[2014-12-18 12:38:20,281] [Error ] [AtmoLight Reinitialise] [ERROR] - AtmoLight: AtmoWinHandler - Reinitialising failed.
Code:
#include <FastLED.h>
// Set the number of leds in the strip.
#define NUM_LEDS 64
#define DATA_PIN 12
CRGB leds[NUM_LEDS];
void setup(){
Serial.begin(115200);
//sanity check delay - allows reprogramming if accidently blowing power w/leds
delay(2000);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
setupLEDs();
loopLeds();
clearLeds();
}
int readByte(){
while (Serial.available() == 0){ /* wait for data */ }
return Serial.read();
}
void loopLeds(){
for(int j = 0; j < 3; j++) {
for(int i = 0 ; i < NUM_LEDS; i++ ) {
memset(leds, 0, NUM_LEDS * 3);
switch(j) {
case 0: leds[i].r = 255; break;
case 1: leds[i].g = 255; break;
case 2: leds[i].b = 255; break;
}
FastLED.show();
delay(5);
}
}
}
void clearLeds(){
for(int dot = 0; dot < NUM_LEDS; dot++){
leds[dot] = CRGB::Black;
};
FastLED.show();
}
// shows colored LEDs for 500ms then blanks out ready to go
void setupLEDs()
{
memset(leds,150, sizeof(leds));
FastLED.show();
delay(500);
memset(leds,0, sizeof(leds));
FastLED.show();
}
void loop() {
if(readByte() == 0xFF){
if(readByte() == 0x00){
if(readByte() == 0x00){
int channels = readByte();
for(int dot = 0; dot < channels; dot++){
leds[dot].r = readByte();
leds[dot].g = readByte();
leds[dot].b = readByte();
}
FastLED.show();
}
}
}
}
Last edited: