[DIY] AtmoOrb - A Hue like mood lamp based on Arduino, ESP8266 wifi module and WS2812B rgb leds | Page 4

Discussion in '[DIY] User Showcases' started by Lightning303, January 12, 2015.

  1. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Yeah, but when i planned and build my Orb, the guy who first tried this had problems. If i remember correctly, the watchdog of the ESP8266 would jump in now and then and restart the module. So at the time this seemed not doable, or atleast not that easy. Also i just started using microcontrollers again and wanted to stick with arduino first.


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. tänzerich

    tänzerich Portal Member

    Joined:
    February 21, 2013
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Austria Austria
    Hi, ich hoffe sehr auf Hilfe bzw. Lösung meines Problems an dem ich schon sehr lange dran bin.
    also:
    Mediaportal 1.15
    AtmoOrb (https://forum.team-mediaportal.com/...e-photon-with-neopixel-tutorial-added.131901/) mit Photon läuft schon einige Monate auf einer Kugellampe mit 94LED's / WS2812B einwandfrei. Danke für die Anleitung!
    Nun gelingt es mir aber nicht das Sytem mit Arduino (proMicro, Leonardo, Yun oder Nano zum laufen zu bringen.
    (https://forum.team-mediaportal.com/...8266-wifi-module-and-ws2812b-rgb-leds.129229/)

    Ich verwende Arduino 1.6.10.
    Arduino Leonardo
    ESP8266
    AtmoOrb

    Sketch ohne Fehlermeldung bis zum Ende: avrdude 15376 bytes of flash verified / avrdude done. Thank you.

    Ich kann im Sketch erfolgreich Startup color Parameter ändern
    z.B.:
    #define NUM_LEDS 60 // Number of leds / am Photon 90
    #define DATA_PIN 15 // Data pin for leds
    #define ID "2" // Id of this lamp (can be string or integer) /am Photon ID = 1

    // Network settings
    #define WIFI_SSID "meine SSID " // SSID of your wifi network
    #define WIFI_PASSWORD "mein Passwort" // Password to your wifi network
    #define DISABLE_DHCP 0 // Disable DHCP
    #define STATIC_IP "239.15.18.2" // Static ip if DHCP is disabled / IP von AtmoOrb
    #define BROADCAST_IP "239.15.18.255" // Broadcast ip of your network / hier bin ich nicht sicher ! Im AtmOrb steht Broadcast Port 49692
    #define PORT 49692 // Port you want to use for broadcasting and for the server Port von AtmoOrb

    Bin für jeden Vorschlag dankbar
    Erich
     
  4. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Vorweg,
    die Methode die ich im ersten Post beschrieben habe ich eher veraltet. Inzwischen ist mit einem ESP8266 kein Arduino mehr nötig. Jedoch habe ich hierfür noch kein neues Tutorial geschrieben und es mag gut sein das ich auch nie eines dafür schreiben werden. Wer aber ein wenig Erfahrung mit Arduinos hat sollte es auch ohne Tutorial hinbekommen.
    Zu finden wäre diese ESP8266 Standalone version hier: https://github.com/Lightning303/AtmoOrb/tree/master/ESP8266/ESP8266 Standalone

    Zu deinem jetztigen Problem.
    Du hast bei STATIC_IP die multicast ip eingetragen die von AtmoOrb genutzt wird. Jedoch unterstützt die Arduino+ESP variante kein multicast, und auch wenn, dann darf und kann keine der Lampen diese IP einnehmen. Du musst eine IP vergeben welche im Bereich deines Heimnetztes liegt. Für gewöhnlich 192.168.x.y, wobei x normalerweise 0, 1 oder 2 ist und y ein Wert zwischen 1 und 254 ist der noch nicht belegt ist.
    In Wirklichkeit ist die Tatsache das du hier was falsches eingeben hast nicht weiter wild, denn du hast DISABLE_DHCP auf 0 stehen, sprich die statische ip wird sowieso nicht benutzt, sondern der ESP bekommt von deinem Router eine IP zugewiesen.
    Bei der Broadcast IP musst du nun auch den IP Bereich deines Heimnetzwerkes nutzten, wobei hier die letzte Ziffer 255 sein muss. Also, z.b. 192.168.1.255.
     
  5. tänzerich

    tänzerich Portal Member

    Joined:
    February 21, 2013
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Austria Austria
    Danke für die schnelle Antwort, hab' bis jetzt versucht was lauffähiges damit zu machen.
    Mein Erfolg ist leider Bescheiden, ich möchte aber noch nicht kapitulieren.

    #define ID "44" // Id of this lamp (can be string or integer)

    // Network settings
    #define WIFI_SSID "_____" // SSID of your wifi network
    #define WIFI_PASSWORD "_________" // Password to your wifi network
    #define DISABLE_DHCP 0 // Disable DHCP
    #define STATIC_IP "192.168.0.44" // Static ip if DHCP is disabled
    #define BROADCAST_IP "192.168.0.255" // Broadcast ip of your network
    #define PORT 49692 // Port you want to use for broadcasting and for the server

    Diese Parameter hab' ich auch im AtmoLight/AtmoOrb Setup eingetragen.
    ID44 erstellt:
    ID44
    Protokoll: IP
    IP 192.168.0.44

    Die Parameter für ID1 wurden nicht geändert.

    Was mach ich da falsch ?
    Erich
     
  6. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Da DHCP nicht disabled ist, ist deine IP nicht 192.168.0.44 sondern eine von deinem Router vegebene. Entweder in AtmoLight auf UDP Broadcast umstellen oder disable dhcp auf 1 setzten.
     
  7. tänzerich

    tänzerich Portal Member

    Joined:
    February 21, 2013
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Austria Austria
    Danke für die schnelle Antwort, hab' bis jetzt versucht was lauffähiges damit zu machen.
    Mein Erfolg ist leider Bescheiden, ich möchte aber noch nicht kapitulieren.

    #define ID "44" // Id of this lamp (can be string or integer)

    // Network settings
    #define WIFI_SSID "_____" // SSID of your wifi network
    #define WIFI_PASSWORD "_________" // Password to your wifi network
    #define DISABLE_DHCP 0 // Disable DHCP
    #define STATIC_IP "192.168.0.44" // Static ip if DHCP is disabled
    #define BROADCAST_IP "192.168.0.255" // Broadcast ip of your network
    #define PORT 49692 // Port you want to use for broadcasting and for the server

    Diese Parameter hab' ich auch im AtmoLight/AtmoOrb Setup eingetragen.
    ID44 erstellt:
    ID44
    Protokoll: IP
    IP 192.168.0.44

    Die Parameter für ID1 wurden nicht geändert.

    Was mach ich da falsch ?
    Erich
    --- Post updated ---
    Hab beide Möglichkeiten ohne Erfolg probiert jetzt aber festgestellt dass im Seriellen Monitor nur unlesbare Zeichen runterwandern, das ist doch nicht normal.
    ESP8266 hab ich beim Chinesen geordert, wird etwas dauern. vielleicht klappts ja dann.
     
  8. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Du musst schon sicher stellen das die baudraten überall richtig gesetzt sind. Im esp (at Befehle) als auch beim arduino (beide serials, einen für USB, einen für esp).

    Gesendet von meinem One mit Tapatalk
     
  9. tänzerich

    tänzerich Portal Member

    Joined:
    February 21, 2013
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Austria Austria
    Hab beide Möglichkeiten ohne Erfolg probiert jetzt aber festgestellt dass im Seriellen Monitor nur unlesbare Zeichen runterwandern, das ist doch nicht normal.
    ESP8266 hab ich beim Chinesen geordert, wird etwas dauern. vielleicht klappts ja dann.
    --- Post updated ---
    hab ich von 9600 aufwärts erfolglos getestet
    // We are using a baud rate of 19200 here.
    // You can either change the ESP8266 baudrate with "AT+CIOBAUD=..."
    // or change the program to use another one by editing "Serial1.begin(19200);"

    und dann noch mit PuTTY und CP2102 kommt zwar ein System Ready, Vendor:www.ai-Thinker.com - reagiert aber nicht auf AT Kommandos.
    Ich hab, so glaube ich den ESP zu sehr misshandelt.
    ESP12F hab ich auch noch hier, vielleicht gelingt mir damit was.
     
  10. tänzerich

    tänzerich Portal Member

    Joined:
    February 21, 2013
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Austria Austria
    Hi, jetzt sind ESP8266 ESP-01 AP+STA WIFI Module und CP 2102 USB to TTL Nodule aus Cina eingetroffen.
    In der Zwischenzeit hab ich festgestellt dass zwar eines meiner alten ESP8266 defekt ist aber leider komme ich auch mit den neuen zu keinem Erfolg.
    Den ESP8266 als Board kann ich zwar mit Arduino 1.6.11 beschreiben aber in Verbindung mit dem Leonardo und Sketch:
    // AtmoOrb by Lightning303
    //
    // Developed for:
    // "Arduino" Micro Pro
    // ESP8266 Module Version 02
    // Firmware Version: 0018000902-AI03 (AT 0.18 & SDK 0.9.2)
    //
    und dem GPIO0 auf GND geht nichts.

    Gibts vielleicht noch einen Tipp wie ich das zum Laufen bringe.
    Danke Erich
     
  11. daaf84

    daaf84 Portal Member

    Joined:
    October 6, 2016
    Messages:
    5
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    Netherlands Netherlands
    Hello,

    Thank you for your work.

    I've downloaded your files and started off with the ESP-only device.
    after some time I've got it uploaded, but no luck with the correct lightning; the NeoPixel ring stays at a warm white color....
    I have the ESP6288-01

    I'm using Hyperion wit OSMC. Ive put this config file on the OSMC machine:

    Code (Text):
    1. // Automatically generated configuration file for Hyperion ambilight daemon
    2. // Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)
    3. // Generated by: HyperCon (The Hyperion deamon configuration file builder)
    4. // Created with HyperCon V1.03.1 (11.06.2016)
    5.  
    6. {
    7.     // DEVICE CONFIGURATION
    8.     "device" :
    9.     {
    10.         "name"       : "MyHyperionConfigAtmoOrb",
    11.         "type"       : "atmoorb",
    12.         "port"     : 49692,
    13.         "output"     : “239.15.18.2”,
    14.         "numLeds"     : 12,
    15.         "orbIds"     : "1",
    16.         "skipSmoothingDiff"     : 0,
    17.         "useOrbSmoothing"     : true,
    18.         "colorOrder" : "rgb"
    19.     },
    20.  
    21.     // COLOR CALIBRATION CONFIG
    22.     "color" :
    23.     {
    24.         "channelAdjustment" :
    25.         [
    26.             {
    27.                 "id"   : "default",
    28.                 "leds" : "*",
    29.                 "pureRed" :
    30.                 {
    31.                     "redChannel"        : 220,
    32.                     "greenChannel"        : 0,
    33.                     "blueChannel"        : 0
    34.                 },
    35.                 "pureGreen" :
    36.                 {
    37.                     "redChannel"        : 78,
    38.                     "greenChannel"        : 145,
    39.                     "blueChannel"        : 0
    40.                 },
    41.                 "pureBlue" :
    42.                 {
    43.                     "redChannel"        : 17,
    44.                     "greenChannel"        : 0,
    45.                     "blueChannel"        : 167
    46.                 }
    47.             }
    48.         ],
    49.         "temperature" :
    50.         [
    51.             {
    52.                 "id"   : "default",
    53.                 "leds" : "*",
    54.                 "correctionValues" :
    55.                 {
    56.                     "red"     : 255,
    57.                     "green"    : 255,
    58.                     "blue"     : 225
    59.                 }
    60.             }
    61.         ],
    62.         "transform" :
    63.         [
    64.             {
    65.                 "id"   : "default",
    66.                 "leds" : "*",
    67.                 "hsl" :
    68.                 {
    69.                     "saturationGain"    : 0.7000,
    70.                     "luminanceGain"        : 1.0000,
    71.                     "luminanceMinimum"        : 0.0000
    72.                 },
    73.                 "red" :
    74.                 {
    75.                     "threshold"     : 0.0000,
    76.                     "gamma"         : 2.7000
    77.                 },
    78.                 "green" :
    79.                 {
    80.                     "threshold"     : 0.0000,
    81.                     "gamma"         : 2.5000
    82.                 },
    83.                 "blue" :
    84.                 {
    85.                     "threshold"     : 0.0000,
    86.                     "gamma"         : 2.5000
    87.                 }
    88.             }
    89.         ],
    90.     // SMOOTHING CONFIG
    91.         "smoothing" :
    92.         {
    93.             "type"            : "linear",
    94.             "time_ms"         : 200,
    95.             "updateFrequency" : 20.0000,
    96.             "updateDelay"     : 0
    97.         }
    98.     },
    99.  
    100.     // NO V4L2 GRABBER CONFIG
    101.     // FRAME GRABBER CONFIG
    102.     "framegrabber" :
    103.     {
    104.         "width" : 64,
    105.         "height" : 64,
    106.         "frequency_Hz" : 10.0,
    107.         "priority" : 890
    108.     },
    109.  
    110.     // BLACKBORDER CONFIG
    111.     "blackborderdetector" :
    112.     {
    113.         "enable" : true,
    114.         "threshold" : 0.0,
    115.         "unknownFrameCnt" : 600,
    116.         "borderFrameCnt" : 50,
    117.         "maxInconsistentCnt" : 10,
    118.         "blurRemoveCnt" : 1,
    119.         "mode" : "default"
    120.     },
    121.  
    122.     // JSON SERVER CONFIG
    123.     "jsonServer" :
    124.     {
    125.         "port" : 19444
    126.     },
    127.  
    128.     // PROTO SERVER CONFIG
    129.     "protoServer" :
    130.     {
    131.         "port" : 19445
    132.     },
    133.  
    134.     // EFFECT PATH
    135.     "effects" :
    136.     {
    137.         "paths" :
    138.         [
    139.             "/storage/hyperion/effects",
    140.             "/usr/share/hyperion/effects"
    141.         ]
    142.     },
    143.  
    144.     // NO KODI CHECK CONFIG
    145.     // NO BOOTEFFECT CONFIG
    146.     // NO BOBLIGHT SERVER CONFIG
    147.     // NO JSON/PROTO FORWARD CONFIG
    148.  
    149.     // LED CONFIGURATION
    150.     "leds" :
    151.     [
    152.         {
    153.             "index" : 0,
    154.             "hscan" : { "minimum" : 0.0000, "maximum" : 1.0000 },
    155.             "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    156.         }
    157.     ],
    158.  
    159.     "endOfJson" : "endOfJson"
    160. }
    161.  
    On the ESP Iv'e used this Sketch:

    Code (Text):
    1. // AtmoOrb by Lightning303 & Rick164
    2. //
    3. // ESP8266 Standalone Version
    4. //
    5. //
    6. // You may change the settings that are commented
    7.  
    8. #define FASTLED_ALLOW_INTERRUPTS 0
    9. // To make sure that all leds get changed 100% of the time, we need to allow FastLED to disabled interrupts for a short while.
    10. // If you experience problems, please set this value to 1.
    11. // This is only needed for 3 wire (1 data line + Vcc and GND) chips (e.g. WS2812B). If you are using WS2801, APA102 or similar chipsets, you can set the value back to 1.
    12.  
    13. #include <ESP8266WiFi.h>
    14. #include <WiFiUDP.h>
    15. #include <FastLED.h>
    16.  
    17. #define NUM_LEDS 12 // Number of leds
    18. #define DATA_PIN 2 // Data pin for leds (the default pin 7 might correspond to pin 13 on some boards)
    19. #define SERIAL_DEBUG 0 // Serial debugging (0=Off, 1=On)
    20.  
    21. #define ID 1 // Id of this lamp
    22.  
    23. // Smoothing
    24. #define SMOOTH_STEPS 20 // Steps to take for smoothing colors
    25. #define SMOOTH_DELAY 10 // Delay between smoothing steps
    26. #define SMOOTH_BLOCK 0 // Block incoming colors while smoothing
    27.  
    28. // Startup color
    29. #define STARTUP_RED 255 // Color shown directly after power on
    30. #define STARTUP_GREEN 175 // Color shown directly after power on
    31. #define STARTUP_BLUE 100 // Color shown directly after power on
    32.  
    33. // White adjustment
    34. #define RED_CORRECTION 220 // Color Correction
    35. #define GREEN_CORRECTION 255 // Color Correction
    36. #define BLUE_CORRECTION 180 // Color Correction
    37.  
    38. // RC Switch
    39. #define RC_SWITCH 0 // RF transmitter to swtich remote controlled power sockets (0=Off, 1=On)
    40. #if RC_SWITCH == 1
    41.   #include <RCSwitch.h>
    42.   #define RC_PIN 2 // Data pin for RF transmitter
    43.   #define RC_SLEEP_DELAY 900000 // Delay until RF transmitter send signals
    44.   char* rcCode0 = "10001"; // First part of the transmission code
    45.   char* rcCode1 = "00010"; // Second part of the transmission code
    46.   RCSwitch mySwitch = RCSwitch();
    47.   boolean remoteControlled = false;
    48. #endif
    49.  
    50. // Network settings
    51. const char* ssid = "diefdijk"; // WiFi SSID
    52. const char* password = "12345678"; // WiFi password
    53. const IPAddress multicastIP(239, 15, 18, 2); // Multicast IP address
    54. const int multicastPort = 49692; // Multicast port number
    55.  
    56. CRGB leds[NUM_LEDS];
    57. WiFiUDP Udp;
    58. byte nextColor[3];
    59. byte prevColor[3];
    60. byte currentColor[3];
    61. byte smoothStep = SMOOTH_STEPS;
    62. unsigned long smoothMillis;
    63.  
    64. void setColor(byte red, byte green, byte blue);
    65. void setSmoothColor(byte red, byte green, byte blue);
    66. void smoothColor();
    67. void clearSmoothColors();
    68.  
    69. void setup()
    70. {
    71.   FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
    72.   //FastLED.setCorrection(TypicalSMD5050);
    73.   FastLED.setCorrection(CRGB(RED_CORRECTION, GREEN_CORRECTION, BLUE_CORRECTION));
    74.   FastLED.showColor(CRGB(STARTUP_RED, STARTUP_GREEN, STARTUP_BLUE));
    75.  
    76.   #if RC_SWITCH == 1
    77.     mySwitch.enableTransmit(RC_PIN);
    78.   #endif
    79.  
    80.   #if SERIAL_DEBUG == 1
    81.     Serial.begin(115200);
    82.   #endif
    83.  
    84.   WiFi.begin(ssid, password);
    85.   while (WiFi.status() != WL_CONNECTED)
    86.   {
    87.     delay(500);
    88.     #if SERIAL_DEBUG == 1
    89.       Serial.print(F("."));
    90.     #endif
    91.   }
    92.   #if SERIAL_DEBUG == 1
    93.     Serial.println("");
    94.     Serial.print(F("Connected to "));
    95.     Serial.println(ssid);
    96.     Serial.print(F("IP address: "));
    97.     Serial.println(WiFi.localIP());
    98.   #endif
    99.   Udp.beginMulticast(WiFi.localIP(), multicastIP, multicastPort);
    100. }
    101.  
    102. void loop()
    103. {
    104.   #if SERIAL_DEBUG == 1
    105.     if (WiFi.status() != WL_CONNECTED)
    106.     {
    107.       Serial.print(F("Lost connection to "));
    108.       Serial.print(ssid);
    109.       Serial.println(F("."));
    110.       Serial.println(F("Trying to reconnect."));
    111.       while (WiFi.status() != WL_CONNECTED)
    112.       {
    113.         delay(500);
    114.         Serial.print(F("."));
    115.       }
    116.       Serial.println("");
    117.       Serial.println(F("Reconnected."));
    118.     }
    119.   #endif
    120.   if (Udp.parsePacket())
    121.   {
    122.     byte len = Udp.available();
    123.     byte rcvd[len];
    124.     Udp.read(rcvd, len);
    125.    
    126.     #if SERIAL_DEBUG == 1
    127.       Serial.print(F("UDP Packet from "));
    128.       Serial.print(Udp.remoteIP());
    129.       Serial.print(F(" to "));
    130.       Serial.println(Udp.destinationIP());
    131.       for (byte i = 0; i < len; i++)
    132.       {
    133.         Serial.print(rcvd[i]);
    134.         Serial.print(F(" "));
    135.       }
    136.       Serial.println("");
    137.     #endif
    138.     if (len >= 8 && rcvd[0] == 0xC0 && rcvd[1] == 0xFF && rcvd[2] == 0xEE && (rcvd[4] == ID || rcvd[4] == 0))
    139.     {
    140.       switch (rcvd[3])
    141.       {
    142.         case 1:
    143.           setColor(0, 0, 0);
    144.           smoothStep = SMOOTH_STEPS;
    145.           break;
    146.         case 2:
    147.         default:
    148.           setSmoothColor(rcvd[5], rcvd[6], rcvd[7]);
    149.           break;
    150.         case 4:
    151.           setColor(rcvd[5], rcvd[6], rcvd[7]);
    152.           smoothStep = SMOOTH_STEPS;
    153.           break;
    154.         case 8:
    155.           Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
    156.           Udp.write(ID);
    157.           Udp.endPacket();
    158.           break;
    159.       }
    160.     }
    161.   }
    162.   if (smoothStep < SMOOTH_STEPS && millis() >= (smoothMillis + (SMOOTH_DELAY * (smoothStep + 1))))
    163.   {
    164.     smoothColor();
    165.   }
    166.   #if RC_SWITCH == 1
    167.     if (remoteControlled && currentColor[0] == 0 && currentColor[1] == 0 && currentColor[2] == 0 && millis() >= smoothMillis + RC_SLEEP_DELAY)
    168.     {
    169.       // Send this signal only once every seconds
    170.       smoothMillis += 1000;
    171.       mySwitch.switchOff(rcCode0, rcCode1);
    172.     }
    173.   #endif
    174. }
    175.  
    176. // Display color on leds
    177. void setColor(byte red, byte green, byte blue)
    178. {
    179.   // Is the new color already active?
    180.   if (currentColor[0] == red && currentColor[1] == green && currentColor[2] == blue)
    181.   {
    182.     return;
    183.   }
    184.   currentColor[0] = red;
    185.   currentColor[1] = green;
    186.   currentColor[2] = blue;
    187.  
    188.   FastLED.showColor(CRGB(red, green, blue));
    189. }
    190.  
    191. // Set a new color to smooth to
    192. void setSmoothColor(byte red, byte green, byte blue)
    193. {
    194.   if (smoothStep == SMOOTH_STEPS || SMOOTH_BLOCK == 0)
    195.   {
    196.     // Is the new color the same as the one we already are smoothing towards?
    197.     // If so dont do anything.
    198.     if (nextColor[0] == red && nextColor[1] == green && nextColor[2] == blue)
    199.     {
    200.       return;
    201.     }
    202.     // Is the new color the same as we have right now?
    203.     // If so stop smoothing and keep the current color.
    204.     else if (currentColor[0] == red && currentColor[1] == green && currentColor[2] == blue)
    205.     {
    206.       smoothStep = SMOOTH_STEPS;
    207.       return;
    208.     }
    209.    
    210.     prevColor[0] = currentColor[0];
    211.     prevColor[1] = currentColor[1];
    212.     prevColor[2] = currentColor[2];
    213.    
    214.     nextColor[0] = red;
    215.     nextColor[1] = green;
    216.     nextColor[2] = blue;
    217.    
    218.     smoothMillis = millis();
    219.     smoothStep = 0;
    220.  
    221.     #if RC_SWITCH == 1
    222.       if (!remoteControlled)
    223.       {
    224.         remoteControlled = true;
    225.       }
    226.     #endif
    227.   }
    228. }
    229.  
    230. // Display one step to the next color
    231. void smoothColor()
    232. {
    233.   smoothStep++;
    234.  
    235.   byte red = prevColor[0] + (((nextColor[0] - prevColor[0]) * smoothStep) / SMOOTH_STEPS);
    236.   byte green = prevColor[1] + (((nextColor[1] - prevColor[1]) * smoothStep) / SMOOTH_STEPS);
    237.   byte blue = prevColor[2] + (((nextColor[2] - prevColor[2]) * smoothStep) / SMOOTH_STEPS);  
    238.  
    239.   setColor(red, green, blue);
    240. }
    My OSMC is on 192.168.2.120

    On the Serial monitor I get some info:
    Code (Text):
    1. ets Jan  8 2013,rst cause:1, boot mode:(3,7)
    2.  
    3. load 0x4010f000, len 1264, room 16
    4. tail 0
    5. chksum 0x0f
    6. csum 0x0f
    7. ~ld
    8.  
    9. Exception (0):
    10. epc1=0x4022ca80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
    11.  
    12. ctx: sys
    13. sp: 3ffff7d0 end: 3fffffb0 offset: 01a0
    14.  
    15. >>>stack>>>
    16. 3ffff970:  4022ca80 00000138 00000180 4022ca69
    17. 3ffff980:  00000000 00000000 00000000 00000033
    18. 3ffff990:  4022cb36 00000021 00000000 00000000
    19. 3ffff9a0:  00000138 00000000 00000001 00000006
    20. 3ffff9b0:  4022ca07 402297b2 00000006 00000000
    21. 3ffff9c0:  3ffee882 00000001 0000002c 0000002d
    22. 3ffff9d0:  3ffee882 00000000 00000006 0000001a
    23. 3ffff9e0:  00000001 3ffee840 3ffee840 ffffffd3
    24. 3ffff9f0:  400061cc 3ffe8310 00000000 40229bab
    25. 3ffffa00:  00000000 3ffee840 00000006 2e2c2927
    26. 3ffffa10:  00004946 4022b3d4 3ffee840 3ffee850
    27. 3ffffa20:  4022b3e9 3ffee840 3ffee850 3ffee840
    28. 3ffffa30:  3ffee8ec 00000001 3ffee850 3ffee840
    29. 3ffffa40:  3ffee840 60000600 60000200 d927f3de
    30. 3ffffa50:  4022722f 00000000 3ffee850 3ffee840
    31. 3ffffa60:  40105e86 60000e00 4022bade 3ffee99a
    32. 3ffffa70:  4022c06d 3ffffa80 00000008 4021bbce
    33. 3ffffa80:  00000000 4021bbb9 00000001 b2000000
    34. 3ffffa90:  a200a6f2 0000b470 3ffefcec 00000000
    35. 3ffffaa0:  40201b2d 3ffefcec 3ffefcec 3ffedb9e
    36. 3ffffab0:  402302b0 00000001 00000001 00000001
    37. 3ffffac0:  00000000 3ffefcec 000002f4 0007c000
    38. 3ffffad0:  401055da 000000e6 3ffedb9e 40218783
    39. 3ffffae0:  40218dfc 60000e00 3ffefcec 40218dd7
    40. 3ffffaf0:  40104fa2 0000007d 000000e6 3fffffb0
    41. 3ffffb00:  3fffff10 787e1f01 4943378e fe4769e8
    42. 3ffffb10:  ffff0200 ffffffff ffff0001 00000008
    43. 3ffffb20:  66656964 6b6a6964 00000000 00000000
    44. 3ffffb30:  00000000 00000000 00000000 00000000
    45. 3ffffb40:  00030503 31000003 35343332 39383736
    46. 3ffffb50:  33323130 37363534 31303938 35343332
    47. 3ffffb60:  0a000036 51000000 a0401016 a03fff51
    48. 3ffffb70:  0a3fff51 a0000000 b4402074 0a3ffea2
    49. 3ffffb80:  48000000 003fff54 dcc56aa5 a389be73
    50. 3ffffb90:  9bd70963 268925f7 89a260c3 04c761fc
    51. 3ffffba0:  1a8a7831 2d5052ee ffffff01 ffffffff
    52. 3ffffbb0:  ffffffff ffffffff ffff00ff ffffffff
    53. 3ffffbc0:  00000008 66656964 6b6a6964 415f5200
    54. 3ffffbd0:  42324636 00000032 00000000 00000000
    55. 3ffffbe0:  00000000 34333231 38373635 32313039
    56. 3ffffbf0:  36353433 30393837 34333231 00003635
    57. 3ffffc00:  00000000 00000000 00000000 00000000
    58. 3ffffc10:  00000000 00000000 00000000 00000000
    59. 3ffffc20:  00000000 c56aa500 89be73dc d70963a3
    60. 3ffffc30:  8925f79b a260c326 c761fc89 8a783104
    61. 3ffffc40:  5052ee1a 0003032d ffffff04 ffff0001
    62. 3ffffc50:  00000008 66656964 6b6a6964 00000000
    63. 3ffffc60:  00000000 00000000 00000000 00000000
    64. 3ffffc70:  00000000 34333231 38373635 32313039
    65. 3ffffc80:  36353433 30393837 34333231 00003635
    66. 3ffffc90:  0000000a 40101651 3fff51a0 3fff51a0
    67. 3ffffca0:  0000000a 402074a0 3ffea2b4 0000000a
    68. 3ffffcb0:  3fff5448 ffffffff ffffffff ffffffff
    69. 3ffffcc0:  ffffffff ffffffff ffffffff ffffffff
    70. 3ffffcd0:  ffffffff ffffffff ffffffff ffffffff
    71. 3ffffce0:  ffffffff ffffffff ffffffff ffffffff
    72. 3ffffcf0:  ffffffff ffffffff ffffffff ffffffff
    73. 3ffffd00:  ffffffff ffffffff ffffffff ffffffff
    74. 3ffffd10:  ffffffff ffffffff ffffffff ffffffff
    75. 3ffffd20:  ffffffff ffffffff ffffffff ffffffff
    76. 3ffffd30:  ffffffff ffffffff ffffffff ffffffff
    77. 3ffffd40:  ffffffff ffffffff ffffffff ffffffff
    78. 3ffffd50:  ffffffff ffffffff ffffffff ffffffff
    79. 3ffffd60:  ffffffff ffffffff ffffffff ffffffff
    80. 3ffffd70:  ffffffff ffffffff ffffffff ffffffff
    81. 3ffffd80:  ffffffff ffffffff ffffffff ffffffff
    82. 3ffffd90:  ffffffff ffffffff ffffffff ffffffff
    83. 3ffffda0:  ffffffff ffffffff ffffffff ffffffff
    84. 3ffffdb0:  ffffffff ffffffff ffffffff ffffffff
    85. 3ffffdc0:  ffffffff ffffffff ffffffff ffffffff
    86. 3ffffdd0:  ffffffff ffffffff ffffffff ffffffff
    87. 3ffffde0:  ffffffff ffffffff ffffffff ffffffff
    88. 3ffffdf0:  ffffffff ffffffff ffffffff ffffffff
    89. 3ffffe00:  ffffffff ffffffff ffffffff ffffffff
    90. 3ffffe10:  ffffffff ffffffff ffffffff ffffffff
    91. 3ffffe20:  ffffffff ffffffff ffffffff ffffffff
    92. 3ffffe30:  ffffffff ffffffff ffffffff ffffffff
    93. 3ffffe40:  ffffffff 04080000 001c110c 01010000
    94. 3ffffe50:  ffffffff 00000003 ffffff00 ffffffff
    95. 3ffffe60:  ffffffff ffffffff ffffffff ffffffff
    96. 3ffffe70:  ffffffff ffffffff ffffffff ffff0064
    97. 3ffffe80:  00000000 00000000 ffffffff ffffffff
    98. 3ffffe90:  ffffffff ffffffff ffffffff ffffffff
    99. 3ffffea0:  ffffffff ffffffff ffffffff ffffffff
    100. 3ffffeb0:  ffffffff ffffffff ffffffff ffffffff
    101. 3ffffec0:  ffffffff ffffffff ffffffff ffffffff
    102. 3ffffed0:  ffffffff ffffffff ffffffff ffffffff
    103. 3ffffee0:  ffffffff ffffffff ffffffff ffffffff
    104. 3ffffef0:  ffffffff dcc56aa5 a389be73 9bd70963
    105. 3fffff00:  268925f7 89a260c3 04c761fc 1a8a7831
    106. 3fffff10:  2d5052ee ffffffff ffffffff ffffffff
    107. 3fffff20:  ffffffff ffffffff ffffffff ffffffff
    108. 3fffff30:  ffffffff ffffffff ffffffff ffffffff
    109. 3fffff40:  ffffffff ffffffff ffffffff ffffffff
    110. 3fffff50:  ffffffff ffffffff ffffffff ffffffff
    111. 3fffff60:  ffffffff ffffffff ffffffff ffffffff
    112. 3fffff70:  ffffffff ffffffff ffffffff ffffffff
    113. 3fffff80:  ffffffff ffffffff ffffffff ffffffff
    114. 3fffff90:  ffffffff 416b728e f54a4572 b723906e
    115. 3fffffa0:  000201e9 14901fb9 ffffff00 55aa55aa
    116. <<<stack<<<
    117.  
    So, something is happening....
    But the LED's do not change....

    Could you help me out?
    Thanks in advance.
     

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!