AtmoDuinoBox - multi protocol arduino code for ambient lights (2 Viewers)

kenwonders

MP Donator
  • Premium Supporter
  • January 19, 2007
    791
    741
    Home Country
    England England
    This may have limited interest to most, as usually you will setup your ardiuino for the light system you wish to use then forget about it.

    However, due to various reasons (like testing) I wanted to be able to leave the arduino alone and run up AtmoWin (in either AtmoDuino or V2 mode) or Ambibox and have them still work. Because they have different headers, this requires something a little different. The solution here will accept any header from the above (could be more later) through a matching method, it does appear to work VERY well at speed.

    To use:
    1. Please already know your FastLED config before trying this, as it's always best to get the lights working with the 'FirstLight' example :)

    //-----------------------EDITABLE CONFIGURATION
    #define NUM_LEDS 176
    #define LED_TYPE WS2812B
    #define DATA_PIN 11
    //#define CLOCK_PIN 0
    #define COLOUR_ORDER RGB
    #define SERIAL_SPEED 512000
    //-----------------------EDITABLE CONFIGURATION

    2. Edit the top section with your configuration, if you use LEDs with a clock pin, uncomment CLOCK_PIN, give it a value and swap the FastLED.addLeds line in 'setup()'
    3. The default speed I set here is 512,000, which is supported in the following ways:
    • Ambibox: 'AtmoDuino' section from SerialPortConfig.ini in the Ambibox program files dir
    • Atmowin: Requires 1.0.0.9 from AtmoWin thread, change speed in device configuration option.
    4. Try other speed values. If you have only a few LEDs then the standard arduino 115,200 will work ok, however that is not enough bandwidth for larger amounts of LEDs. It is also common to have some lower speeds fail despite higher ones working, most Unos can go pretty fast.
    5. Hope it works for you :)

    Info about the detection for those interested:
    I worked out how to calculate the correct 4 bytes for each header type, this means you only need to enter the NUM_LEDS value:
    AtmoDuinoV2 - 0xD7, 0xEE, 0x23, NUM_LEDS - 1
    AtmoDuino on Ambibox - 0xFF, 0x00, 0x00, NUM_LEDS * 3 - this value can overflow, but when truncated the byte leftover is matching ambibox, so that is what ambibox appears to do too
    AtmoDuino on AtmoWin - 0xFF, 0x00, 0x00, NUM_LEDS

    So that the loop is not complex, it is only ensuring each header part received matches at least one predefined header, but it could do better. If anyone better at that sort of thing (I tried a success array but it took too long) then please let me know.
     

    Attachments

    • AmbiDuinoBox.zip
      1 KB

    Users who are viewing this thread

    Similar threads

    MP1 MP2 WS2812B DE
    // AtmoduinoV2 by NevCairiel, based on RickDB Atmoduino V1 #include <FastLED.h> // Set the number of leds in the strip. #define NUM_LEDS 188 // type of the LED controller #define LED_TYPE WS2812B // data and clock pins #define DATA_PIN 10 CRGB leds[NUM_LEDS]; void setup(){ Serial.begin(115200); FastLED.addLeds<LED_TYPE...
    // AtmoduinoV2 by NevCairiel, based on RickDB Atmoduino V1 #include <FastLED.h> // Set the number of leds in the strip. #define...
    Hello guys. For a long time now i was thinking of getting myself a new project :) Well recently i decided to start the ambilight...
    Replies
    14
    Views
    4K
    UPDATE: Since both AtmoWin and AmbiBox have decent 'delay' functionality, I will not be updating this code anymore, as I have stopped using it myself. The code is free to be used or abused if it is any use to someone.
    UPDATE: Since both AtmoWin and AmbiBox have decent 'delay' functionality, I will not be updating this code anymore, as I have...
    This Arduino code can allow you to add a delay (in milliseconds) to the output so that your AtmoDuino updates at the same time as...
    Replies
    18
    Views
    13K
    • Locked
    • Sticky
    |- Hardware : Leds Protection : IP20/65/67/68 IP20(nonwaterproof) IP65 Waterproof(glue on top) IP67 Waterproof(in silicone tube) IP68 Waterproof(underwater) The Protection also has effect on transmiting light. IP20/30 | IP65 | IP67 : Credits to Sinonlea for leds captures
    |- Hardware : Leds Protection : IP20/65/67/68 IP20(nonwaterproof) IP65 Waterproof(glue on top) IP67 Waterproof(in silicone tube)...
    This Thread is marked as bloqued, because have the goal of map user to good system. and explain a bit how work the Lighning system...
    Replies
    1
    Views
    4K
    • Sticky
    Version 1.0.0.8 : 2014.08.06 Correction of save value for Software_gamma_blue in XML. (Azzuro)
    Version 1.0.0.8 : 2014.08.06 Correction of save value for Software_gamma_blue in XML. (Azzuro)
    AtmoWin Release Thread ( no support here) MPEI Installer ...
    Replies
    4
    Views
    14K
    • Sticky
    Is this the right thread for downloading the latest version of Atmolight MP1? Extension Manager URL for Atmolight returns HTTP error. For AtmoWin the same. Thanks
    Is this the right thread for downloading the latest version of Atmolight MP1? Extension Manager URL for Atmolight returns HTTP...
    Overview AtmoLight is a process plugin that interfaces with different ambilight solutions and brings Ambilight to MediaPortal. The...
    Replies
    390
    Views
    110K
    Top Bottom