Page 19 of 20

Re: [App] libSambilight E/F/H (MST-only)

Posted: Wed Nov 30, 2022 10:26 am
by fromul
kisspach wrote: Wed Nov 30, 2022 1:38 am I solved it. Between the various tests, I realized that the first LED burned out. I replaced it and made the connections correctly.
Then I modified the script to fit the nodeMCU Amica esp8266mod 12-f. For the WS2801 I put RGB colours as order.
Now everything works! Congrats on the superb work and thanks for the support!
I'm attaching the modified version of the .ino script if it helps anyone.

Code: Select all

//##### SETTINGS ############

#define BAUDRATE  921600  // Serial port speed
#define NUM_LEDS 86      // Number of leds
#define BRIGHTNESS 255   // Maximum brightness
#define LED_TYPE WS2801  // Led strip type for FastLED
#define COLOR_ORDER RGB  // Led color order
#define PIN_DATA 14      // Led data output pin
#define PIN_CLOCK 12     // Led data clock pin (uncomment if you're using a 4-wire LED type)

//###########################

#define FASTLED_ESP8266_RAW_PIN_ORDER


#include <Arduino.h>
#include <FastLED.h>

CRGB leds[NUM_LEDS];
uint8_t* ledsRaw = (uint8_t*)leds;

const uint8_t magic[] = { 'A', 'd', 'a' };
#define MAGICSIZE sizeof(magic)
#define HICHECK (MAGICSIZE)
#define LOCHECK (MAGICSIZE + 1)
#define CHECKSUM (MAGICSIZE + 2)

enum processModes_t { Header,
                      Data } mode = Header;

int16_t c, outPos, bytesRemaining;
unsigned long t, lastByteTime;
uint8_t headPos, hi, lo, chk;

void setup() {
  FastLED.addLeds<WS2801, PIN_DATA, PIN_CLOCK, COLOR_ORDER>(leds, NUM_LEDS);

  FastLED.setBrightness(BRIGHTNESS);
  FastLED.show();

#if defined(ESP8266) || defined(ESP32)
  Serial.setRxBufferSize(2048);
#endif

  Serial.begin(BAUDRATE);

#if defined(ESP8266)
  delay(500);
  Serial.swap();  // RX pin winoll be GPIO13 on ESP8266
  delay(500);
#endif

  lastByteTime = millis();
}

void loop() {
  t = millis();

  if ((c = Serial.read()) >= 0) {
    lastByteTime = t;

    switch (mode) {
      case Header:
        if (headPos < MAGICSIZE) {
          if (c == magic[headPos]) {
            headPos++;
          } else {
            headPos = 0;
          }
        } else {
          switch (headPos) {
            case HICHECK:
              hi = c;
              headPos++;
              break;
            case LOCHECK:
              lo = c;
              headPos++;
              break;
            case CHECKSUM:
              chk = c;
              if (chk == (hi ^ lo ^ 0x55)) {
                bytesRemaining = 3L * (256L * (long)hi + (long)lo + 1L);
                outPos = 0;
                memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
                mode = Data;
              }
              headPos = 0;
              break;
          }
        }
        break;
      case Data:
        if (outPos < sizeof(leds)) {
          ledsRaw[outPos++] = c;
        }
        bytesRemaining--;

        if (bytesRemaining == 0) {
          mode = Header;
          while (Serial.available() > 0) {
            Serial.read();
          }
          FastLED.show();
        }
        break;
    }
  } else if (((t - lastByteTime) >= (uint32_t)120 * 60 * 1000 && mode == Header) || ((t - lastByteTime) >= (uint32_t)1000 && mode == Data)) {
    memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
    FastLED.show();
    mode = Header;
    lastByteTime = t;
  }
}
great job ;)

Re: [App] libSambilight E/F/H (MST-only)

Posted: Sun Dec 04, 2022 11:15 am
by kisspach
It happens to me that during the night, when the tv is off, all the green LEDs light up. I turn off the power to the LEDs, put it back on and they stay off. Then when I turn on the tv, they initially work fine, but after a few minutes, everything that should be black is displayed in green. I have to turn the tv off and on again 3 or 4 times for the problem to go away. Has this happened to anyone before?

Re: [App] libSambilight E/F/H (MST-only)

Posted: Sun Jan 29, 2023 10:18 pm
by itajackass
Any chance to see it working on DEU firmware? ( ue48h8000 tv)

Re: [App] libSambilight E/F/H (MST-only)

Posted: Fri Feb 17, 2023 1:45 pm
by brunogts77
Is it possible to make it work on the J series?

Re: [App] libSambilight E/F/H (MST-only)

Posted: Wed Feb 22, 2023 12:26 am
by kisspach
Hi everyone! I don't know if it's my problem or a bug. it happens to me that when I turn on the TV, after a few minutes, the LEDs remain fixed on the white colour, it always happens when the projected image is white. I noticed that the esp8266 is completely blocked and no longer responds to any command. I have to unplug the board and plug it back in. then it continues to work fine. the esp is powered by the same power supply as the leds. I also noticed that when I raise or lower the volume with the remote control, the LEDs seem to flash. I don't know if the two things are related. is it my problem? of power? or code or TV?

Re: [App] libSambilight E/F/H (MST-only)

Posted: Tue Feb 28, 2023 11:41 pm
by kisspach
I think i fixed it!
From the power supply I made two different cables come out. Not as seen in the first post.
One to power the leds and one for the esp8266. Then I connected the GND PIN of the esp with the GND of the leds, so that there is no flickering. Now i have no more problems!

Re: [App] libSambilight E/F/H (MST-only)

Posted: Thu Apr 20, 2023 5:13 pm
by brunogts77
Hello, Hello, Is it possible to make sambilight work on TVs with Tizzen operating system? I have a J series TV and would like to install sambilight on it. thanks.

Re: [App] libSambilight E/F/H (MST-only)

Posted: Thu Apr 20, 2023 5:49 pm
by tasshack
brunogts77 wrote: Thu Apr 20, 2023 5:13 pm Hello, Hello, Is it possible to make sambilight work on TVs with Tizzen operating system? I have a J series TV and would like to install sambilight on it. thanks.
It is not possible.

Re: [App] libSambilight E/F/H (MST-only)

Posted: Sun Apr 23, 2023 2:38 pm
by brunogts77
OK thanks. But now, what's the reason?

Re: [App] libSambilight E/F/H (MST-only)

Posted: Sun Apr 23, 2023 2:57 pm
by tasshack
brunogts77 wrote: Sun Apr 23, 2023 2:38 pm OK thanks. But now, what's the reason?
Because i don't have a J series TV.