Normal
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-01I'm using Hyperion wit OSMC. Ive put this config file on the OSMC machine:[code]// Automatically generated configuration file for Hyperion ambilight daemon// Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)// Generated by: HyperCon (The Hyperion deamon configuration file builder)// Created with HyperCon V1.03.1 (11.06.2016){ // DEVICE CONFIGURATION "device" : { "name" : "MyHyperionConfigAtmoOrb", "type" : "atmoorb", "port" : 49692, "output" : “239.15.18.2”, "numLeds" : 12, "orbIds" : "1", "skipSmoothingDiff" : 0, "useOrbSmoothing" : true, "colorOrder" : "rgb" }, // COLOR CALIBRATION CONFIG "color" : { "channelAdjustment" : [ { "id" : "default", "leds" : "*", "pureRed" : { "redChannel" : 220, "greenChannel" : 0, "blueChannel" : 0 }, "pureGreen" : { "redChannel" : 78, "greenChannel" : 145, "blueChannel" : 0 }, "pureBlue" : { "redChannel" : 17, "greenChannel" : 0, "blueChannel" : 167 } } ], "temperature" : [ { "id" : "default", "leds" : "*", "correctionValues" : { "red" : 255, "green" : 255, "blue" : 225 } } ], "transform" : [ { "id" : "default", "leds" : "*", "hsl" : { "saturationGain" : 0.7000, "luminanceGain" : 1.0000, "luminanceMinimum" : 0.0000 }, "red" : { "threshold" : 0.0000, "gamma" : 2.7000 }, "green" : { "threshold" : 0.0000, "gamma" : 2.5000 }, "blue" : { "threshold" : 0.0000, "gamma" : 2.5000 } } ], // SMOOTHING CONFIG "smoothing" : { "type" : "linear", "time_ms" : 200, "updateFrequency" : 20.0000, "updateDelay" : 0 } }, // NO V4L2 GRABBER CONFIG // FRAME GRABBER CONFIG "framegrabber" : { "width" : 64, "height" : 64, "frequency_Hz" : 10.0, "priority" : 890 }, // BLACKBORDER CONFIG "blackborderdetector" : { "enable" : true, "threshold" : 0.0, "unknownFrameCnt" : 600, "borderFrameCnt" : 50, "maxInconsistentCnt" : 10, "blurRemoveCnt" : 1, "mode" : "default" }, // JSON SERVER CONFIG "jsonServer" : { "port" : 19444 }, // PROTO SERVER CONFIG "protoServer" : { "port" : 19445 }, // EFFECT PATH "effects" : { "paths" : [ "/storage/hyperion/effects", "/usr/share/hyperion/effects" ] }, // NO KODI CHECK CONFIG // NO BOOTEFFECT CONFIG // NO BOBLIGHT SERVER CONFIG // NO JSON/PROTO FORWARD CONFIG // LED CONFIGURATION "leds" : [ { "index" : 0, "hscan" : { "minimum" : 0.0000, "maximum" : 1.0000 }, "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } } ], "endOfJson" : "endOfJson"}[/code]On the ESP Iv'e used this Sketch:[code]// AtmoOrb by Lightning303 & Rick164//// ESP8266 Standalone Version////// You may change the settings that are commented#define FASTLED_ALLOW_INTERRUPTS 0// To make sure that all leds get changed 100% of the time, we need to allow FastLED to disabled interrupts for a short while.// If you experience problems, please set this value to 1.// 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.#include <ESP8266WiFi.h>#include <WiFiUDP.h>#include <FastLED.h>#define NUM_LEDS 12 // Number of leds#define DATA_PIN 2 // Data pin for leds (the default pin 7 might correspond to pin 13 on some boards)#define SERIAL_DEBUG 0 // Serial debugging (0=Off, 1=On)#define ID 1 // Id of this lamp// Smoothing#define SMOOTH_STEPS 20 // Steps to take for smoothing colors#define SMOOTH_DELAY 10 // Delay between smoothing steps#define SMOOTH_BLOCK 0 // Block incoming colors while smoothing// Startup color#define STARTUP_RED 255 // Color shown directly after power on#define STARTUP_GREEN 175 // Color shown directly after power on#define STARTUP_BLUE 100 // Color shown directly after power on// White adjustment#define RED_CORRECTION 220 // Color Correction#define GREEN_CORRECTION 255 // Color Correction#define BLUE_CORRECTION 180 // Color Correction// RC Switch#define RC_SWITCH 0 // RF transmitter to swtich remote controlled power sockets (0=Off, 1=On)#if RC_SWITCH == 1 #include <RCSwitch.h> #define RC_PIN 2 // Data pin for RF transmitter #define RC_SLEEP_DELAY 900000 // Delay until RF transmitter send signals char* rcCode0 = "10001"; // First part of the transmission code char* rcCode1 = "00010"; // Second part of the transmission code RCSwitch mySwitch = RCSwitch(); boolean remoteControlled = false;#endif// Network settingsconst char* ssid = "diefdijk"; // WiFi SSIDconst char* password = "12345678"; // WiFi passwordconst IPAddress multicastIP(239, 15, 18, 2); // Multicast IP addressconst int multicastPort = 49692; // Multicast port numberCRGB leds[NUM_LEDS];WiFiUDP Udp;byte nextColor[3];byte prevColor[3];byte currentColor[3];byte smoothStep = SMOOTH_STEPS;unsigned long smoothMillis;void setColor(byte red, byte green, byte blue);void setSmoothColor(byte red, byte green, byte blue);void smoothColor();void clearSmoothColors();void setup(){ FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); //FastLED.setCorrection(TypicalSMD5050); FastLED.setCorrection(CRGB(RED_CORRECTION, GREEN_CORRECTION, BLUE_CORRECTION)); FastLED.showColor(CRGB(STARTUP_RED, STARTUP_GREEN, STARTUP_BLUE)); #if RC_SWITCH == 1 mySwitch.enableTransmit(RC_PIN); #endif #if SERIAL_DEBUG == 1 Serial.begin(115200); #endif WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); #if SERIAL_DEBUG == 1 Serial.print(F(".")); #endif } #if SERIAL_DEBUG == 1 Serial.println(""); Serial.print(F("Connected to ")); Serial.println(ssid); Serial.print(F("IP address: ")); Serial.println(WiFi.localIP()); #endif Udp.beginMulticast(WiFi.localIP(), multicastIP, multicastPort);}void loop(){ #if SERIAL_DEBUG == 1 if (WiFi.status() != WL_CONNECTED) { Serial.print(F("Lost connection to ")); Serial.print(ssid); Serial.println(F(".")); Serial.println(F("Trying to reconnect.")); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print(F(".")); } Serial.println(""); Serial.println(F("Reconnected.")); } #endif if (Udp.parsePacket()) { byte len = Udp.available(); byte rcvd[len]; Udp.read(rcvd, len); #if SERIAL_DEBUG == 1 Serial.print(F("UDP Packet from ")); Serial.print(Udp.remoteIP()); Serial.print(F(" to ")); Serial.println(Udp.destinationIP()); for (byte i = 0; i < len; i++) { Serial.print(rcvd[i]); Serial.print(F(" ")); } Serial.println(""); #endif if (len >= 8 && rcvd[0] == 0xC0 && rcvd[1] == 0xFF && rcvd[2] == 0xEE && (rcvd[4] == ID || rcvd[4] == 0)) { switch (rcvd[3]) { case 1: setColor(0, 0, 0); smoothStep = SMOOTH_STEPS; break; case 2: default: setSmoothColor(rcvd[5], rcvd[6], rcvd[7]); break; case 4: setColor(rcvd[5], rcvd[6], rcvd[7]); smoothStep = SMOOTH_STEPS; break; case 8: Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); Udp.write(ID); Udp.endPacket(); break; } } } if (smoothStep < SMOOTH_STEPS && millis() >= (smoothMillis + (SMOOTH_DELAY * (smoothStep + 1)))) { smoothColor(); } #if RC_SWITCH == 1 if (remoteControlled && currentColor[0] == 0 && currentColor[1] == 0 && currentColor[2] == 0 && millis() >= smoothMillis + RC_SLEEP_DELAY) { // Send this signal only once every seconds smoothMillis += 1000; mySwitch.switchOff(rcCode0, rcCode1); } #endif}// Display color on ledsvoid setColor(byte red, byte green, byte blue){ // Is the new color already active? if (currentColor[0] == red && currentColor[1] == green && currentColor[2] == blue) { return; } currentColor[0] = red; currentColor[1] = green; currentColor[2] = blue; FastLED.showColor(CRGB(red, green, blue));}// Set a new color to smooth tovoid setSmoothColor(byte red, byte green, byte blue){ if (smoothStep == SMOOTH_STEPS || SMOOTH_BLOCK == 0) { // Is the new color the same as the one we already are smoothing towards? // If so dont do anything. if (nextColor[0] == red && nextColor[1] == green && nextColor[2] == blue) { return; } // Is the new color the same as we have right now? // If so stop smoothing and keep the current color. else if (currentColor[0] == red && currentColor[1] == green && currentColor[2] == blue) { smoothStep = SMOOTH_STEPS; return; } prevColor[0] = currentColor[0]; prevColor[1] = currentColor[1]; prevColor[2] = currentColor[2]; nextColor[0] = red; nextColor[1] = green; nextColor[2] = blue; smoothMillis = millis(); smoothStep = 0; #if RC_SWITCH == 1 if (!remoteControlled) { remoteControlled = true; } #endif }}// Display one step to the next colorvoid smoothColor(){ smoothStep++; byte red = prevColor[0] + (((nextColor[0] - prevColor[0]) * smoothStep) / SMOOTH_STEPS); byte green = prevColor[1] + (((nextColor[1] - prevColor[1]) * smoothStep) / SMOOTH_STEPS); byte blue = prevColor[2] + (((nextColor[2] - prevColor[2]) * smoothStep) / SMOOTH_STEPS); setColor(red, green, blue);}[/code]My OSMC is on 192.168.2.120On the Serial monitor I get some info:[code]ets Jan 8 2013,rst cause:1, boot mode:(3,7)load 0x4010f000, len 1264, room 16tail 0chksum 0x0fcsum 0x0f~ldException (0):epc1=0x4022ca80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000ctx: syssp: 3ffff7d0 end: 3fffffb0 offset: 01a0>>>stack>>>3ffff970: 4022ca80 00000138 00000180 4022ca693ffff980: 00000000 00000000 00000000 000000333ffff990: 4022cb36 00000021 00000000 000000003ffff9a0: 00000138 00000000 00000001 000000063ffff9b0: 4022ca07 402297b2 00000006 000000003ffff9c0: 3ffee882 00000001 0000002c 0000002d3ffff9d0: 3ffee882 00000000 00000006 0000001a3ffff9e0: 00000001 3ffee840 3ffee840 ffffffd33ffff9f0: 400061cc 3ffe8310 00000000 40229bab3ffffa00: 00000000 3ffee840 00000006 2e2c29273ffffa10: 00004946 4022b3d4 3ffee840 3ffee8503ffffa20: 4022b3e9 3ffee840 3ffee850 3ffee8403ffffa30: 3ffee8ec 00000001 3ffee850 3ffee8403ffffa40: 3ffee840 60000600 60000200 d927f3de3ffffa50: 4022722f 00000000 3ffee850 3ffee8403ffffa60: 40105e86 60000e00 4022bade 3ffee99a3ffffa70: 4022c06d 3ffffa80 00000008 4021bbce3ffffa80: 00000000 4021bbb9 00000001 b20000003ffffa90: a200a6f2 0000b470 3ffefcec 000000003ffffaa0: 40201b2d 3ffefcec 3ffefcec 3ffedb9e3ffffab0: 402302b0 00000001 00000001 000000013ffffac0: 00000000 3ffefcec 000002f4 0007c0003ffffad0: 401055da 000000e6 3ffedb9e 402187833ffffae0: 40218dfc 60000e00 3ffefcec 40218dd73ffffaf0: 40104fa2 0000007d 000000e6 3fffffb03ffffb00: 3fffff10 787e1f01 4943378e fe4769e83ffffb10: ffff0200 ffffffff ffff0001 000000083ffffb20: 66656964 6b6a6964 00000000 000000003ffffb30: 00000000 00000000 00000000 000000003ffffb40: 00030503 31000003 35343332 393837363ffffb50: 33323130 37363534 31303938 353433323ffffb60: 0a000036 51000000 a0401016 a03fff513ffffb70: 0a3fff51 a0000000 b4402074 0a3ffea23ffffb80: 48000000 003fff54 dcc56aa5 a389be733ffffb90: 9bd70963 268925f7 89a260c3 04c761fc3ffffba0: 1a8a7831 2d5052ee ffffff01 ffffffff3ffffbb0: ffffffff ffffffff ffff00ff ffffffff3ffffbc0: 00000008 66656964 6b6a6964 415f52003ffffbd0: 42324636 00000032 00000000 000000003ffffbe0: 00000000 34333231 38373635 323130393ffffbf0: 36353433 30393837 34333231 000036353ffffc00: 00000000 00000000 00000000 000000003ffffc10: 00000000 00000000 00000000 000000003ffffc20: 00000000 c56aa500 89be73dc d70963a33ffffc30: 8925f79b a260c326 c761fc89 8a7831043ffffc40: 5052ee1a 0003032d ffffff04 ffff00013ffffc50: 00000008 66656964 6b6a6964 000000003ffffc60: 00000000 00000000 00000000 000000003ffffc70: 00000000 34333231 38373635 323130393ffffc80: 36353433 30393837 34333231 000036353ffffc90: 0000000a 40101651 3fff51a0 3fff51a03ffffca0: 0000000a 402074a0 3ffea2b4 0000000a3ffffcb0: 3fff5448 ffffffff ffffffff ffffffff3ffffcc0: ffffffff ffffffff ffffffff ffffffff3ffffcd0: ffffffff ffffffff ffffffff ffffffff3ffffce0: ffffffff ffffffff ffffffff ffffffff3ffffcf0: ffffffff ffffffff ffffffff ffffffff3ffffd00: ffffffff ffffffff ffffffff ffffffff3ffffd10: ffffffff ffffffff ffffffff ffffffff3ffffd20: ffffffff ffffffff ffffffff ffffffff3ffffd30: ffffffff ffffffff ffffffff ffffffff3ffffd40: ffffffff ffffffff ffffffff ffffffff3ffffd50: ffffffff ffffffff ffffffff ffffffff3ffffd60: ffffffff ffffffff ffffffff ffffffff3ffffd70: ffffffff ffffffff ffffffff ffffffff3ffffd80: ffffffff ffffffff ffffffff ffffffff3ffffd90: ffffffff ffffffff ffffffff ffffffff3ffffda0: ffffffff ffffffff ffffffff ffffffff3ffffdb0: ffffffff ffffffff ffffffff ffffffff3ffffdc0: ffffffff ffffffff ffffffff ffffffff3ffffdd0: ffffffff ffffffff ffffffff ffffffff3ffffde0: ffffffff ffffffff ffffffff ffffffff3ffffdf0: ffffffff ffffffff ffffffff ffffffff3ffffe00: ffffffff ffffffff ffffffff ffffffff3ffffe10: ffffffff ffffffff ffffffff ffffffff3ffffe20: ffffffff ffffffff ffffffff ffffffff3ffffe30: ffffffff ffffffff ffffffff ffffffff3ffffe40: ffffffff 04080000 001c110c 010100003ffffe50: ffffffff 00000003 ffffff00 ffffffff3ffffe60: ffffffff ffffffff ffffffff ffffffff3ffffe70: ffffffff ffffffff ffffffff ffff00643ffffe80: 00000000 00000000 ffffffff ffffffff3ffffe90: ffffffff ffffffff ffffffff ffffffff3ffffea0: ffffffff ffffffff ffffffff ffffffff3ffffeb0: ffffffff ffffffff ffffffff ffffffff3ffffec0: ffffffff ffffffff ffffffff ffffffff3ffffed0: ffffffff ffffffff ffffffff ffffffff3ffffee0: ffffffff ffffffff ffffffff ffffffff3ffffef0: ffffffff dcc56aa5 a389be73 9bd709633fffff00: 268925f7 89a260c3 04c761fc 1a8a78313fffff10: 2d5052ee ffffffff ffffffff ffffffff3fffff20: ffffffff ffffffff ffffffff ffffffff3fffff30: ffffffff ffffffff ffffffff ffffffff3fffff40: ffffffff ffffffff ffffffff ffffffff3fffff50: ffffffff ffffffff ffffffff ffffffff3fffff60: ffffffff ffffffff ffffffff ffffffff3fffff70: ffffffff ffffffff ffffffff ffffffff3fffff80: ffffffff ffffffff ffffffff ffffffff3fffff90: ffffffff 416b728e f54a4572 b723906e3fffffa0: 000201e9 14901fb9 ffffff00 55aa55aa<<<stack<<<[/code]So, something is happening....But the LED's do not change....Could you help me out?Thanks in advance.
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]// Automatically generated configuration file for Hyperion ambilight daemon
// Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)
// Generated by: HyperCon (The Hyperion deamon configuration file builder)
// Created with HyperCon V1.03.1 (11.06.2016)
{
// DEVICE CONFIGURATION
"device" :
"name" : "MyHyperionConfigAtmoOrb",
"type" : "atmoorb",
"port" : 49692,
"output" : “239.15.18.2”,
"numLeds" : 12,
"orbIds" : "1",
"skipSmoothingDiff" : 0,
"useOrbSmoothing" : true,
"colorOrder" : "rgb"
},
// COLOR CALIBRATION CONFIG
"color" :
"channelAdjustment" :
[
"id" : "default",
"leds" : "*",
"pureRed" :
"redChannel" : 220,
"greenChannel" : 0,
"blueChannel" : 0
"pureGreen" :
"redChannel" : 78,
"greenChannel" : 145,
"pureBlue" :
"redChannel" : 17,
"blueChannel" : 167
}
],
"temperature" :
"correctionValues" :
"red" : 255,
"green" : 255,
"blue" : 225
"transform" :
"hsl" :
"saturationGain" : 0.7000,
"luminanceGain" : 1.0000,
"luminanceMinimum" : 0.0000
"red" :
"threshold" : 0.0000,
"gamma" : 2.7000
"green" :
"gamma" : 2.5000
"blue" :
// SMOOTHING CONFIG
"smoothing" :
"type" : "linear",
"time_ms" : 200,
"updateFrequency" : 20.0000,
"updateDelay" : 0
// NO V4L2 GRABBER CONFIG
// FRAME GRABBER CONFIG
"framegrabber" :
"width" : 64,
"height" : 64,
"frequency_Hz" : 10.0,
"priority" : 890
// BLACKBORDER CONFIG
"blackborderdetector" :
"enable" : true,
"threshold" : 0.0,
"unknownFrameCnt" : 600,
"borderFrameCnt" : 50,
"maxInconsistentCnt" : 10,
"blurRemoveCnt" : 1,
"mode" : "default"
// JSON SERVER CONFIG
"jsonServer" :
"port" : 19444
// PROTO SERVER CONFIG
"protoServer" :
"port" : 19445
// EFFECT PATH
"effects" :
"paths" :
"/storage/hyperion/effects",
"/usr/share/hyperion/effects"
]
// NO KODI CHECK CONFIG
// NO BOOTEFFECT CONFIG
// NO BOBLIGHT SERVER CONFIG
// NO JSON/PROTO FORWARD CONFIG
// LED CONFIGURATION
"leds" :
"index" : 0,
"hscan" : { "minimum" : 0.0000, "maximum" : 1.0000 },
"vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
"endOfJson" : "endOfJson"
[/code]
On the ESP Iv'e used this Sketch:
[code]// AtmoOrb by Lightning303 & Rick164
//
// ESP8266 Standalone Version
// You may change the settings that are commented
#define FASTLED_ALLOW_INTERRUPTS 0
// To make sure that all leds get changed 100% of the time, we need to allow FastLED to disabled interrupts for a short while.
// If you experience problems, please set this value to 1.
// 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.
#include <ESP8266WiFi.h>
#include <WiFiUDP.h>
#include <FastLED.h>
#define NUM_LEDS 12 // Number of leds
#define DATA_PIN 2 // Data pin for leds (the default pin 7 might correspond to pin 13 on some boards)
#define SERIAL_DEBUG 0 // Serial debugging (0=Off, 1=On)
#define ID 1 // Id of this lamp
// Smoothing
#define SMOOTH_STEPS 20 // Steps to take for smoothing colors
#define SMOOTH_DELAY 10 // Delay between smoothing steps
#define SMOOTH_BLOCK 0 // Block incoming colors while smoothing
// Startup color
#define STARTUP_RED 255 // Color shown directly after power on
#define STARTUP_GREEN 175 // Color shown directly after power on
#define STARTUP_BLUE 100 // Color shown directly after power on
// White adjustment
#define RED_CORRECTION 220 // Color Correction
#define GREEN_CORRECTION 255 // Color Correction
#define BLUE_CORRECTION 180 // Color Correction
// RC Switch
#define RC_SWITCH 0 // RF transmitter to swtich remote controlled power sockets (0=Off, 1=On)
#if RC_SWITCH == 1
#include <RCSwitch.h>
#define RC_PIN 2 // Data pin for RF transmitter
#define RC_SLEEP_DELAY 900000 // Delay until RF transmitter send signals
char* rcCode0 = "10001"; // First part of the transmission code
char* rcCode1 = "00010"; // Second part of the transmission code
RCSwitch mySwitch = RCSwitch();
boolean remoteControlled = false;
#endif
// Network settings
const char* ssid = "diefdijk"; // WiFi SSID
const char* password = "12345678"; // WiFi password
const IPAddress multicastIP(239, 15, 18, 2); // Multicast IP address
const int multicastPort = 49692; // Multicast port number
CRGB leds[NUM_LEDS];
WiFiUDP Udp;
byte nextColor[3];
byte prevColor[3];
byte currentColor[3];
byte smoothStep = SMOOTH_STEPS;
unsigned long smoothMillis;
void setColor(byte red, byte green, byte blue);
void setSmoothColor(byte red, byte green, byte blue);
void smoothColor();
void clearSmoothColors();
void setup()
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
//FastLED.setCorrection(TypicalSMD5050);
FastLED.setCorrection(CRGB(RED_CORRECTION, GREEN_CORRECTION, BLUE_CORRECTION));
FastLED.showColor(CRGB(STARTUP_RED, STARTUP_GREEN, STARTUP_BLUE));
mySwitch.enableTransmit(RC_PIN);
#if SERIAL_DEBUG == 1
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
delay(500);
Serial.print(F("."));
Serial.println("");
Serial.print(F("Connected to "));
Serial.println(ssid);
Serial.print(F("IP address: "));
Serial.println(WiFi.localIP());
Udp.beginMulticast(WiFi.localIP(), multicastIP, multicastPort);
void loop()
if (WiFi.status() != WL_CONNECTED)
Serial.print(F("Lost connection to "));
Serial.print(ssid);
Serial.println(F("."));
Serial.println(F("Trying to reconnect."));
Serial.println(F("Reconnected."));
if (Udp.parsePacket())
byte len = Udp.available();
byte rcvd[len];
Udp.read(rcvd, len);
Serial.print(F("UDP Packet from "));
Serial.print(Udp.remoteIP());
Serial.print(F(" to "));
Serial.println(Udp.destinationIP());
for (byte i = 0; i < len; i++)
Serial.print(rcvd[i]);
Serial.print(F(" "));
if (len >= 8 && rcvd[0] == 0xC0 && rcvd[1] == 0xFF && rcvd[2] == 0xEE && (rcvd[4] == ID || rcvd[4] == 0))
switch (rcvd[3])
case 1:
setColor(0, 0, 0);
smoothStep = SMOOTH_STEPS;
break;
case 2:
default:
setSmoothColor(rcvd[5], rcvd[6], rcvd[7]);
case 4:
setColor(rcvd[5], rcvd[6], rcvd[7]);
case 8:
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
Udp.write(ID);
Udp.endPacket();
if (smoothStep < SMOOTH_STEPS && millis() >= (smoothMillis + (SMOOTH_DELAY * (smoothStep + 1))))
smoothColor();
if (remoteControlled && currentColor[0] == 0 && currentColor[1] == 0 && currentColor[2] == 0 && millis() >= smoothMillis + RC_SLEEP_DELAY)
// Send this signal only once every seconds
smoothMillis += 1000;
mySwitch.switchOff(rcCode0, rcCode1);
// Display color on leds
void setColor(byte red, byte green, byte blue)
// Is the new color already active?
if (currentColor[0] == red && currentColor[1] == green && currentColor[2] == blue)
return;
currentColor[0] = red;
currentColor[1] = green;
currentColor[2] = blue;
FastLED.showColor(CRGB(red, green, blue));
// Set a new color to smooth to
void setSmoothColor(byte red, byte green, byte blue)
if (smoothStep == SMOOTH_STEPS || SMOOTH_BLOCK == 0)
// Is the new color the same as the one we already are smoothing towards?
// If so dont do anything.
if (nextColor[0] == red && nextColor[1] == green && nextColor[2] == blue)
// Is the new color the same as we have right now?
// If so stop smoothing and keep the current color.
else if (currentColor[0] == red && currentColor[1] == green && currentColor[2] == blue)
prevColor[0] = currentColor[0];
prevColor[1] = currentColor[1];
prevColor[2] = currentColor[2];
nextColor[0] = red;
nextColor[1] = green;
nextColor[2] = blue;
smoothMillis = millis();
smoothStep = 0;
if (!remoteControlled)
remoteControlled = true;
// Display one step to the next color
void smoothColor()
smoothStep++;
byte red = prevColor[0] + (((nextColor[0] - prevColor[0]) * smoothStep) / SMOOTH_STEPS);
byte green = prevColor[1] + (((nextColor[1] - prevColor[1]) * smoothStep) / SMOOTH_STEPS);
byte blue = prevColor[2] + (((nextColor[2] - prevColor[2]) * smoothStep) / SMOOTH_STEPS);
setColor(red, green, blue);
}[/code]
My OSMC is on 192.168.2.120
On the Serial monitor I get some info:
[code]ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld
Exception (0):
epc1=0x4022ca80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: sys
sp: 3ffff7d0 end: 3fffffb0 offset: 01a0
>>>stack>>>
3ffff970: 4022ca80 00000138 00000180 4022ca69
3ffff980: 00000000 00000000 00000000 00000033
3ffff990: 4022cb36 00000021 00000000 00000000
3ffff9a0: 00000138 00000000 00000001 00000006
3ffff9b0: 4022ca07 402297b2 00000006 00000000
3ffff9c0: 3ffee882 00000001 0000002c 0000002d
3ffff9d0: 3ffee882 00000000 00000006 0000001a
3ffff9e0: 00000001 3ffee840 3ffee840 ffffffd3
3ffff9f0: 400061cc 3ffe8310 00000000 40229bab
3ffffa00: 00000000 3ffee840 00000006 2e2c2927
3ffffa10: 00004946 4022b3d4 3ffee840 3ffee850
3ffffa20: 4022b3e9 3ffee840 3ffee850 3ffee840
3ffffa30: 3ffee8ec 00000001 3ffee850 3ffee840
3ffffa40: 3ffee840 60000600 60000200 d927f3de
3ffffa50: 4022722f 00000000 3ffee850 3ffee840
3ffffa60: 40105e86 60000e00 4022bade 3ffee99a
3ffffa70: 4022c06d 3ffffa80 00000008 4021bbce
3ffffa80: 00000000 4021bbb9 00000001 b2000000
3ffffa90: a200a6f2 0000b470 3ffefcec 00000000
3ffffaa0: 40201b2d 3ffefcec 3ffefcec 3ffedb9e
3ffffab0: 402302b0 00000001 00000001 00000001
3ffffac0: 00000000 3ffefcec 000002f4 0007c000
3ffffad0: 401055da 000000e6 3ffedb9e 40218783
3ffffae0: 40218dfc 60000e00 3ffefcec 40218dd7
3ffffaf0: 40104fa2 0000007d 000000e6 3fffffb0
3ffffb00: 3fffff10 787e1f01 4943378e fe4769e8
3ffffb10: ffff0200 ffffffff ffff0001 00000008
3ffffb20: 66656964 6b6a6964 00000000 00000000
3ffffb30: 00000000 00000000 00000000 00000000
3ffffb40: 00030503 31000003 35343332 39383736
3ffffb50: 33323130 37363534 31303938 35343332
3ffffb60: 0a000036 51000000 a0401016 a03fff51
3ffffb70: 0a3fff51 a0000000 b4402074 0a3ffea2
3ffffb80: 48000000 003fff54 dcc56aa5 a389be73
3ffffb90: 9bd70963 268925f7 89a260c3 04c761fc
3ffffba0: 1a8a7831 2d5052ee ffffff01 ffffffff
3ffffbb0: ffffffff ffffffff ffff00ff ffffffff
3ffffbc0: 00000008 66656964 6b6a6964 415f5200
3ffffbd0: 42324636 00000032 00000000 00000000
3ffffbe0: 00000000 34333231 38373635 32313039
3ffffbf0: 36353433 30393837 34333231 00003635
3ffffc00: 00000000 00000000 00000000 00000000
3ffffc10: 00000000 00000000 00000000 00000000
3ffffc20: 00000000 c56aa500 89be73dc d70963a3
3ffffc30: 8925f79b a260c326 c761fc89 8a783104
3ffffc40: 5052ee1a 0003032d ffffff04 ffff0001
3ffffc50: 00000008 66656964 6b6a6964 00000000
3ffffc60: 00000000 00000000 00000000 00000000
3ffffc70: 00000000 34333231 38373635 32313039
3ffffc80: 36353433 30393837 34333231 00003635
3ffffc90: 0000000a 40101651 3fff51a0 3fff51a0
3ffffca0: 0000000a 402074a0 3ffea2b4 0000000a
3ffffcb0: 3fff5448 ffffffff ffffffff ffffffff
3ffffcc0: ffffffff ffffffff ffffffff ffffffff
3ffffcd0: ffffffff ffffffff ffffffff ffffffff
3ffffce0: ffffffff ffffffff ffffffff ffffffff
3ffffcf0: ffffffff ffffffff ffffffff ffffffff
3ffffd00: ffffffff ffffffff ffffffff ffffffff
3ffffd10: ffffffff ffffffff ffffffff ffffffff
3ffffd20: ffffffff ffffffff ffffffff ffffffff
3ffffd30: ffffffff ffffffff ffffffff ffffffff
3ffffd40: ffffffff ffffffff ffffffff ffffffff
3ffffd50: ffffffff ffffffff ffffffff ffffffff
3ffffd60: ffffffff ffffffff ffffffff ffffffff
3ffffd70: ffffffff ffffffff ffffffff ffffffff
3ffffd80: ffffffff ffffffff ffffffff ffffffff
3ffffd90: ffffffff ffffffff ffffffff ffffffff
3ffffda0: ffffffff ffffffff ffffffff ffffffff
3ffffdb0: ffffffff ffffffff ffffffff ffffffff
3ffffdc0: ffffffff ffffffff ffffffff ffffffff
3ffffdd0: ffffffff ffffffff ffffffff ffffffff
3ffffde0: ffffffff ffffffff ffffffff ffffffff
3ffffdf0: ffffffff ffffffff ffffffff ffffffff
3ffffe00: ffffffff ffffffff ffffffff ffffffff
3ffffe10: ffffffff ffffffff ffffffff ffffffff
3ffffe20: ffffffff ffffffff ffffffff ffffffff
3ffffe30: ffffffff ffffffff ffffffff ffffffff
3ffffe40: ffffffff 04080000 001c110c 01010000
3ffffe50: ffffffff 00000003 ffffff00 ffffffff
3ffffe60: ffffffff ffffffff ffffffff ffffffff
3ffffe70: ffffffff ffffffff ffffffff ffff0064
3ffffe80: 00000000 00000000 ffffffff ffffffff
3ffffe90: ffffffff ffffffff ffffffff ffffffff
3ffffea0: ffffffff ffffffff ffffffff ffffffff
3ffffeb0: ffffffff ffffffff ffffffff ffffffff
3ffffec0: ffffffff ffffffff ffffffff ffffffff
3ffffed0: ffffffff ffffffff ffffffff ffffffff
3ffffee0: ffffffff ffffffff ffffffff ffffffff
3ffffef0: ffffffff dcc56aa5 a389be73 9bd70963
3fffff00: 268925f7 89a260c3 04c761fc 1a8a7831
3fffff10: 2d5052ee ffffffff ffffffff ffffffff
3fffff20: ffffffff ffffffff ffffffff ffffffff
3fffff30: ffffffff ffffffff ffffffff ffffffff
3fffff40: ffffffff ffffffff ffffffff ffffffff
3fffff50: ffffffff ffffffff ffffffff ffffffff
3fffff60: ffffffff ffffffff ffffffff ffffffff
3fffff70: ffffffff ffffffff ffffffff ffffffff
3fffff80: ffffffff ffffffff ffffffff ffffffff
3fffff90: ffffffff 416b728e f54a4572 b723906e
3fffffa0: 000201e9 14901fb9 ffffff00 55aa55aa
<<<stack<<<
So, something is happening....
But the LED's do not change....
Could you help me out?
Thanks in advance.