Moin,
ich habe laut dieser Anleitung:
https://hyperion-project.org/t…-ws2801-ws2812b-apa102.8/
Mein Ambilight aufgebaut, benutze dazu jedoch das Raspberry Pi 4 wo ich das Problem vermute.
Eingerichtet ist alles, der Raspi erkennt den Grabber wie auch das "Arduino". "Arduino" startet auch mit Hyperion und alle LED's leuchten bei der Startsequenz auf, das wars aber dann auch schon. Über Hyperion kann ich das Bild vom Grabber abrufen. Wenn ich die LED Streifen mit FastLED über das "Arduino" ansteuer funktionieren sie Problemlos.
Hardware die ich nutze:
Raspberry Pi 4
BTF-LIGHTING WS2812B 5M 60 LEDs
Easyday EasyCap USB 2.0 UTV007 RCA AV S-Video CVBS
Musou HDMI auf 3RCA Composite …V Converter Adapter 1080P
BTF-LIGHTING DC5V 20A 100W
ELEGOO UNO R3 Mikrocontroller …uino Entwicklungsumgebung
Hier einmal der LOG: Vielleicht habe ich auch nur etwas falsch eingestellt.
[H]
SSH Traffic:
ssh connected
ssh out: /storage/.config/autostart.sh > /dev/null 2>&1 &
ssh out: cat /storage/logfiles/hyperion.log
ssh in: Hyperion Ambilight Deamon (835)
ssh in: Version : V1.03.5 (GitHub-66bef6b/fb413cd-1566231780
ssh in: Build Time: Aug 25 2019 10:39:29
ssh in: INFO: Selected configuration file: /storage/.config/hyperion.config.json
ssh in: HYPERION INFO: ColorTransform 'default' => [0; 307]
ssh in: HYPERION INFO: ColorCorrection 'default' => [0; 307]
ssh in: HYPERION INFO: ColorAdjustment 'default' => [0; 307]
ssh in: LEDDEVICE INFO: configuration:
ssh in: {
ssh in: "colorOrder" : "grb",
ssh in: "name" : "MyPi",
ssh in: "output" : "/dev/ttyACM0",
ssh in: "rate" : 460800,
ssh in: "type" : "adalight"
ssh in: }
ssh in: Opening UART: /dev/ttyACM0
ssh in: INFO: Creating linear smoothing
ssh in: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
ssh in: EFFECTENGINE INFO: 27 effects loaded from directory /storage/hyperion/effects
ssh in: EFFECTENGINE INFO: Initializing Python interpreter
ssh in: INFO: Hyperion started and initialised
ssh in: INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow swirl fast on channel 0
ssh in: BLACKBORDER INFO: threshold set to 0.15 (39)
ssh in: BLACKBORDER INFO: mode:default
ssh in: started
ssh in: INFO: Kodi checker created and started
ssh in: INFO: Json server created and started on port 19444
ssh in: INFO: Proto server created and started on port 19445
ssh in: DISPMANXGRABBER INFO: Display opened with resolution: 4x1053523228
ssh in: BLACKBORDER INFO: threshold set to 0.15 (39)
ssh in: BLACKBORDER INFO: mode:default
ssh in: INFO: Frame grabber created and started
ssh in: V4L2GRABBER INFO: width=720 height=576
ssh in: V4L2GRABBER INFO: pixel format=YUYV
ssh in: BLACKBORDER INFO: threshold set to 0.15 (39)
ssh in: BLACKBORDER INFO: mode:default
ssh in: V4L2GRABBER INFO: signal threshold set to: {0,0,0}
ssh in: V4L2GRABBER INFO: started
ssh in: INFO: V4L2 grabber created and started
ssh in: KODICHECK ERROR: Kodi Connection error (0)
ssh in: DISPMANXGRABBER ERROR: Snapshot failed: -1
ssh in: BORDER SWITCH REQUIRED!!
ssh in: CURRENT BORDER TYPE: unknown=0 hor.size=6 vert.size=0
ssh in: DISPMANXGRABBER ERROR: Snapshot failed: -1
ssh in: DISPMANXGRABBER ERROR: Snapshot failed: -1
[/H]
Auf dem Arduino läuft folgendes:
[H]
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 308
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 6
//#define CLOCK_PIN 13
#define COLOR_ORDER RGB
// Adalight sends a "Magic Word" (defined in /etc/boblight.conf) before sending the pixel data
uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk, i;
// Baudrate, higher rate allows faster refresh rate and more LEDs (defined in /etc/boblight.conf)
#define serialRate 500000
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
// Uncomment/edit one of the following lines for your leds arrangement.
// FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
// initial RGB flash
LEDS.showColor(CRGB(255, 0, 0));
delay(500);
LEDS.showColor(CRGB(0, 255, 0));
delay(500);
LEDS.showColor(CRGB(0, 0, 255));
delay(500);
LEDS.showColor(CRGB(0, 0, 0));
Serial.begin(serialRate);
Serial.print("Ada\n"); // Send "Magic Word" string to host
}
void loop() {
// wait for first byte of Magic Word
for(i = 0; i < sizeof prefix; ++i) {
waitLoop: while (!Serial.available()) ;;
// Check next byte in Magic Word
if(prefix == Serial.read()) continue;
// otherwise, start over
i = 0;
goto waitLoop;
}
// Hi, Lo, Checksum
while (!Serial.available()) ;;
hi=Serial.read();
while (!Serial.available()) ;;
lo=Serial.read();
while (!Serial.available()) ;;
chk=Serial.read();
// if checksum does not match go back to wait
if (chk != (hi ^ lo ^ 0x55))
{
i=0;
goto waitLoop;
}
memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
// read the transmission data and set LED values
for (uint8_t i = 0; i < NUM_LEDS; i++) {
byte r, g, b;
while(!Serial.available());
r = Serial.read();
while(!Serial.available());
g = Serial.read();
while(!Serial.available());
b = Serial.read();
leds.r = r;
leds.g = g;
leds.b = b;
}
// shows new values
FastLED.show();
}
[/H]