Olli123 : Atmoduino firmware (2 Viewers)

Olli123

Portal Pro
February 3, 2012
144
17
Hi,

so i´m close to my final version of my Ambilight.

But i have a new problem.
For having enough LEDs for my TV i order 3m of WS2812B stripes.

As i want to test them i noticed that the FastSPI libary V1 is only supporting WS2801 chipset and NOT the ws2811/2812B.
When i try to enter my WS2811 chipset in it, i can not compile the atmoduino code.

Driving the LEDs with FastSPI2 is no problem.

Does anybody know if i can use the atmoduino code also with my ws2812B stripes? Have anyone ported the arduino code to FastSPI2 already?
I tried it on myself but failed :(
 

Olli123

Portal Pro
February 3, 2012
144
17
Hi,

i manged it to change the code to FastSPI2.

The FirstLight test is running perfect.

But when i use AtmoWin something goes wrong with the communication.

Trying to set a static color makes it light in different color. But moving the sliders change the leds.

So something is received but it does not work.........

I post my code.... maybe someone will find the problem. Unfortunatelly i can not change datarate settings with FastSPI2 anymore .........

I will be very happy if someone can help me!!

Code:
#include <FastSPI_LED2.h>

//Set the number of leds in the strip.
#define NUM_LEDS 120

// Sometimes chipsets wire in a backwards sort of way
//struct CRGB {
//  unsigned char g;
//  unsigned char b;
//  unsigned char r;
// };
// struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
//struct CRGB *leds; alt
struct CRGB leds[NUM_LEDS];

#define PIN 4
#define DATA_PIN 11
#define CLOCK_PIN 13

void setup(){
  Serial.begin(115200);
  //FastSPI_LED.setLeds(NUM_LEDS); alt
  LEDS.addLeds<WS2811, 11>(leds, NUM_LEDS);

  //Change this to match your led strip
  //FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2811);
 

  //If non-default SPI pins have been used change this.
  //FastSPI_LED.setPin(PIN,11,13);
  //FastSPI_LED.setPin(PIN);
  //FastSPI_LED.setDataRate(5);

  //LEDS.init();
  LEDS.show();
  //leds = (struct CRGB*)FastSPI_LED.getRGBData();
  clearLeds();
}

int readByte(){
  while(Serial.available()==0){
//    LEDS.stop();
//    clearLeds();
  }
  LEDS.show();
  return Serial.read();
}

void clearLeds(){
  for(int tmpChannel=0; tmpChannel<NUM_LEDS; tmpChannel++){
    leds[tmpChannel].r = 0;
    leds[tmpChannel].b = 0;
    leds[tmpChannel].g = 0; 
  };
  FastSPI_LED.show();
}

void FirstLight(){
    // Move a single white led
  for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
      // Turn our current led on to white, then show the leds
      leds[whiteLed] = CRGB::White;

      // Show the leds (only one of which is set to white, from above)
      FastLED.show();

      // Wait a little bit
      delay(100);

      // Turn our current led back to black for the next loop around
      leds[whiteLed] = CRGB::Black;
  }
} 

void loop(){
  //FirstLight();
 
  if(readByte() == 0xFF){
    if(readByte() == 0x00){
      if(readByte() == 0x00){
        int channels = readByte();
        for(int channel=0; channel<channels; channel++){
          leds[channel].r = readByte();
          leds[channel].b = readByte();
          leds[channel].g = readByte();
        }
        FastSPI_LED.show();
      }
    }
  }
  else
  {
    //clearLeds();
    //FastSPI_LED.stop();
  }
}
 

Olli123

Portal Pro
February 3, 2012
144
17
Why should it be no option?
The FastSPI 1 libary is out of date and discontinued.........
Chips like the WS2811 or WS2812B are the newer generation working with the FastSPI2 libary, listed as hotties.

As i see RickDB is still active and writing around in same threads. Dunno why he is not upgrading his project......... i would be lucky about some help and support.
I think the LPD8806 is also not supported in the FastSPI 1 libary or is it?

I think the target is to bring down RickDB custom protocoll to the stripes. If it is done by the FastSPI1 or FastSPI2 libary should not matter.
 

Olli123

Portal Pro
February 3, 2012
144
17
After spending some more time yesterday, my stripes are working now.
Had to change a line and the rgb order but looks good now.
AtmoWin is working now. Static Color / Color changer and Live view are also working.

Only when setting static color green upper than 100 with the slider the Arduino is freezing............ I need to reboot it............
But i think this could also be a problem from AtmoWin. Dunno why this happens. Red and Blue can be set to 255 with the slider....
Also notice when the slider for green is moved is starts fading but sometimes its flashing in a wrong color. Just for a tick. When you continue moving the slider it goes back to green. Dunno whats wrong with it.

Today i will mount it on my TV and try to use it in "real" conditions.
Installing mpe plugin and so.............

Keep fingers crossed :)
 

kilik360

MP Donator
  • Premium Supporter
  • September 3, 2010
    576
    235
    Home Country
    Canada Canada
    I currently use RickDB's atmoduino with FastSPI_LED library. I saw yesterday that FastSPI2 is now named FastLED and should support my WS2801 strand.

    If I want to update my librarie to FastLED, I think RickDB's atmoduino is not compatible with... righ ?
    Should I get Olli123's firmware when available?

    thanks[DOUBLEPOST=1391430487][/DOUBLEPOST]
    Only when setting static color green upper than 100 with the slider the Arduino is freezing............ I need to reboot it............
    But i think this could also be a problem from AtmoWin. Dunno why this happens. Red and Blue can be set to 255 with the slider....
    Also notice when the slider for green is moved is starts fading but sometimes its flashing in a wrong color. Just for a tick. When you continue moving the slider it goes back to green. Dunno whats wrong with it.


    I have the exact same problem with Arduino Uno rev.3 and RickDB's atmoduino and FastSPI_LED librarie. But I never use static problem so it's a false problem for my setup.
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,956
    5,629
    France - IDF
    Home Country
    France France
    If I want to update my librarie to FastLED, I think RickDB's atmoduino is not compatible with... righ ?
    yes is compatible, i want update my skecth based on Teensy, but should be compatible with arduino only data port change.

    the skecth of olli123 don't use the last release of fastLED ( new FastSPI, and replace FAstSPI_LED2)
     

    Users who are viewing this thread

    Top Bottom