[New Plugin] Atmolight Process Plugin **Update 25.05.2010 V1.9** (6 Viewers)

TheBatfink

MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    I know this is for ambilight.. but has anyone got any of the other Phillips lighting products? I've just gotten a Pillips Hue setup and wondering if this plugin could have any interaction with Hue's API or if anyone is already thinking about writing some kind of plugin to interact with Hue?

    Edit: I see there is already an Ambilight + Hue app in the app store from Phillips so their API must be able to interact with both, could be nice if Atomolight could do something with just Hue lights and the Bridge :)
     
    Last edited:

    bob808

    MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    Home Country
    United Kingdom United Kingdom
    Is there a guide to follow for this ? I have an arduino uno and the lights I need for this but not sure where to start with flashing the arduino to work with atmolight.

    Thanks!
     

    bob808

    MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    Home Country
    United Kingdom United Kingdom
    I am struggling to program my arduino uno v3 - getting the following error

    AtmoDuino:27: error: no matching function for call to 'CFastSPI_LED::setPin(int, int, int)'
    C:\Program Files\Arduino\libraries\FastSPI_LED/FastSPI_LED.h:125: note: candidates are: void CFastSPI_LED::setPin(int)

    Can anyone help me get this working? I am using a string of 50 ws2801 lights and trying to get the following config to work

    Code:
    #include <FastSPI_LED.h>
    
    //Set the number of leds in the strip.
    #define NUM_LEDS 50
    
    // Sometimes chipsets wire in a backwards sort of way
    struct CRGB {
      unsigned char b;
      unsigned char r;
      unsigned char g;
    };
    // struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
    struct CRGB *leds;
    
    #define PIN 4
    void setup(){
      Serial.begin(115200);
      FastSPI_LED.setLeds(NUM_LEDS);
    
      //Change this to match your led strip
      FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);
    
      //Change datarate to match your led strip as well
      FastSPI_LED.setDataRate(0);
    
      //If non-default SPI pins have been used change this.
      FastSPI_LED.setPin(PIN,11,13);
    
      FastSPI_LED.init();
      FastSPI_LED.start();
      leds = (struct CRGB*)FastSPI_LED.getRGBData();
      clearLeds();
    }
    
    int readByte(){
      while(Serial.available()==0){
        FastSPI_LED.stop();
      }
      FastSPI_LED.start();
      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 loop(){
      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();
      }
    }
     

    bob808

    MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    Home Country
    United Kingdom United Kingdom
    Yep - tried several different versions of it too... at first I had missed it and get different errors, but with it the one I posted above.

    I just realised that I was doing this without the board plugged in to my pc last night as I was only pressing test on the IDE software so assumed it didn't contact the uno - is this my issue and I need the arduino plugged in when pressing test? Only thought of this whilst driving to work this morning but the more I think of it I am hoping it couldn't see the arduino connected so complained about the pins I had selected as it couldn't find them? Wishful thinking maybe?[DOUBLEPOST=1390293327][/DOUBLEPOST]does the version of the IDE software used make a difference? I downloaded 1.0.5 from the arduino site
     

    bob808

    MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    Home Country
    United Kingdom United Kingdom
    aha - I don't think I selected a board - I will have another look tonight! Thanks guys will let you know how I fare!

    edit - it defaulted to the correct board... issue is the FastSPI_LED.setPin(PIN,11,13); line - if I change this to just 1 integer it works, it doesn't like me having 2 or 3 pins defined (message is candidates are: void CFastSPI_LED::setPin(int))

    Edited post rather than adding more off topic messages - I have tried multiple fastspi packages, but none seem to let me have 3 defined. Any ideas? Do I need to define pin 4, 11 and 13?

    Edit (again) - flashing this with setPin(4) or 11 or 13 works, but the colours don't tie up correctly - I get greens instead of red etc.

    Has anyone got a working fastSPI that supports 3 pin's defined so will flash, or a working fastspi2 code I can use?
     
    Last edited:

    Users who are viewing this thread

    Top Bottom