Du musst Deinen Code auch schon richtig zu Deinem Setup anpassen
#define MAX_LEDS 355#define LED_TYPE SK6812
habe ich, wurde raw kopiert ....
Besser und einfacher wäre ein ESP32 oder ESP8266 mit WLED.
Wie bindet man wled mit arduino
Du musst Deinen Code auch schon richtig zu Deinem Setup anpassen
#define MAX_LEDS 355#define LED_TYPE SK6812
habe ich, wurde raw kopiert ....
Besser und einfacher wäre ein ESP32 oder ESP8266 mit WLED.
Wie bindet man wled mit arduino
Möchte gern ein pc mit Ambilight.
Da ich es gern so einfach wie möglich mag, arduino + hyperion.
nutze diesen code:
ZitatAlles anzeigen#include "FastLED.h"
#define ANALOG_MODE_AVERAGE 0
#define ANALOG_MODE_LAST_LED 1
/**************************************
S E T U P
set following values to your needs
**************************************/
#define INITIAL_LED_TEST_ENABLED true
#define INITIAL_LED_TEST_BRIGHTNESS 32 // 0..255
#define INITIAL_LED_TEST_TIME_MS 500 // 10..
// Number of leds in your strip. set to "1" and ANALOG_OUTPUT_ENABLED to "true" to activate analog only
// As of 26/1/2017:
// 582 leaves ZERO bytes free and this
// 410 is ok
// tested with 500 leds and is fine (despite the warning)
#define MAX_LEDS 500
// type of your led controller, possible values, see below
#define LED_TYPE WS2812B
// 3 wire (pwm): NEOPIXEL BTM1829 TM1812 TM1809 TM1804 TM1803 UCS1903 UCS1903B UCS1904 UCS2903 WS2812 WS2852
// S2812B SK6812 SK6822 APA106 PL9823 WS2811 WS2813 APA104 WS2811_40 GW6205 GW6205_40 LPD1886 LPD1886_8BIT
// 4 wire (spi): LPD8806 WS2801 WS2803 SM16716 P9813 APA102 SK9822 DOTSTAR
// For 3 wire led stripes line Neopixel/Ws2812, 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), both defines DATA_PIN and CLOCK_PIN are needed
// DATA_PIN, or DATA_PIN, CLOCK_PIN
#define LED_PINS 6 // 3 wire leds
//#define LED_PINS 6, 13 // 4 wire leds
#define COLOR_ORDER GRB // colororder of the stripe, set RGB in hyperion
#define OFF_TIMEOUT 15000 // ms to switch off after no data was received, set 0 to deactivate
// analog rgb uni color led stripe - using of hyperion smoothing is recommended
// ATTENTION this pin config is default for atmega328 based arduinos, others might work to
// if you have flickering analog leds this might be caused by unsynced pwm signals
// try other pins is more or less the only thing that helps
#define ANALOG_OUTPUT_ENABLED false
#define ANALOG_MODE ANALOG_MODE_LAST_LED // use ANALOG_MODE_AVERAGE or ANALOG_MODE_LAST_LED
#define ANALOG_GROUND_PIN 8 // additional ground pin to make wiring a bit easier
#define ANALOG_RED_PIN 9
#define ANALOG_GREEN_PIN 10
#define ANALOG_BLUE_PIN 11
// overall color adjustments
#define ANALOG_BRIGHTNESS_RED 255 // maximum brightness for analog 0-255
#define ANALOG_BRIGHTNESS_GREEN 255 // maximum brightness for analog 0-255
#define ANALOG_BRIGHTNESS_BLUE 255 // maximum brightness for analog 0-255
#define BRIGHTNESS 255 // maximum brightness 0-255
#define DITHER_MODE BINARY_DITHER // BINARY_DITHER or DISABLE_DITHER
#define COLOR_TEMPERATURE CRGB(255,255,255) // RGB value describing the color temperature
#define COLOR_CORRECTION TypicalLEDStrip // predefined fastled color correction
//#define COLOR_CORRECTION CRGB(255,255,255) // or RGB value describing the color correction
// Baudrate, higher rate allows faster refresh rate and more LEDs
//#define serialRate 460800 // use 115200 for ftdi based boards
#define serialRate 115200 // use 115200 for ftdi based boards
//#define serialRate 500000 // use 115200 for ftdi based boards
/**************************************
A D A L I G H T C O D E
no user changes needed
**************************************/
// 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;
unsigned long endTime;
// Define the array of leds
CRGB leds[MAX_LEDS];
// set rgb to analog led stripe
void showAnalogRGB(const CRGB& led) {
if (ANALOG_OUTPUT_ENABLED) {
byte r = map(led.r, 0,255,0,ANALOG_BRIGHTNESS_RED);
byte g = map(led.g, 0,255,0,ANALOG_BRIGHTNESS_GREEN);
byte b = map(led.b, 0,255,0,ANALOG_BRIGHTNESS_BLUE);
analogWrite(ANALOG_RED_PIN , r);
analogWrite(ANALOG_GREEN_PIN, g);
analogWrite(ANALOG_BLUE_PIN , b);
}
}
// set color to all leds
void showColor(const CRGB& led) {
#if MAX_LEDS > 1 ANALOG_OUTPUT_ENABLED == false
LEDS.showColor(led);
#endif
showAnalogRGB(led);
}
// switch of digital and analog leds
void switchOff() {
#if MAX_LEDS > 1 ANALOG_OUTPUT_ENABLED == false
memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));
FastLED.show();
#endif
showAnalogRGB(leds[0]);
}
// function to check if serial data is available
// if timeout occured leds switch of, if configured
bool checkIncommingData() {
boolean dataAvailable = true;
while (!Serial.available()) {
if ( OFF_TIMEOUT > 0 && endTime < millis()) {
switchOff();
dataAvailable = false;
endTime = millis() + OFF_TIMEOUT;
}
}
return dataAvailable;
}
// main function that setups and runs the code
void setup() {
Serial.begin(serialRate);
// analog output
if (ANALOG_OUTPUT_ENABLED) {
// additional ground pin to make wiring a bit easier
pinMode(ANALOG_GROUND_PIN, OUTPUT);
digitalWrite(ANALOG_GROUND_PIN, LOW);
pinMode(ANALOG_BLUE_PIN , OUTPUT);
pinMode(ANALOG_RED_PIN , OUTPUT);
pinMode(ANALOG_GREEN_PIN, OUTPUT);
}
int ledCount = MAX_LEDS;
if (ANALOG_OUTPUT_ENABLED == true && ANALOG_MODE == ANALOG_MODE_LAST_LED) {
ledCount--;
}
#if MAX_LEDS > 1 ANALOG_OUTPUT_ENABLED == false
FastLED.addLeds<LED_TYPE, LED_PINS, COLOR_ORDER>(leds, ledCount);
#endif
// color adjustments
FastLED.setBrightness ( BRIGHTNESS );
FastLED.setTemperature( COLOR_TEMPERATURE );
FastLED.setCorrection ( COLOR_CORRECTION );
FastLED.setDither ( DITHER_MODE );
// initial RGB flash
#if INITIAL_LED_TEST_ENABLED == true
for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
{
showColor(CRGB(v,v,v));
delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
}
for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)
{
showColor(CRGB(v,v,v));
delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);
}
#endif
showColor(CRGB(0, 0, 0));
Serial.print("Ada\n"); // Send "Magic Word" string to host
Serial.println("Ada: LED num: " + String(FastLED.size())); //Return number of LEDs configured
boolean transmissionSuccess;
unsigned long sum_r, sum_g, sum_b;
// loop() is avoided as even that small bit of function overhead
// has a measurable impact on this code's overall throughput.
for(;;) {
// wait for first byte of Magic Word
for (i = 0; i < sizeof prefix; ++i) {
// If next byte is not in Magic Word, the start over
if (!checkIncommingData() prefix[i] != Serial.read()) {
i = 0;
}
}
// Hi, Lo, Checksum
if (!checkIncommingData()) continue;
hi = Serial.read();
if (!checkIncommingData()) continue;
lo = Serial.read();
if (!checkIncommingData()) continue;
chk = Serial.read();
// if checksum does not match go back to wait
if (chk != (hi ^ lo ^ 0x55)) continue;
memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));
transmissionSuccess = true;
sum_r = 0;
sum_g = 0;
sum_b = 0;
int num_leds = min ( MAX_LEDS, (hi<<8) + lo + 1 );
// read the transmission data and set LED values
for (int idx = 0; idx < num_leds; idx++) {
byte r, g, b;
if (!checkIncommingData()) {
transmissionSuccess = false;
break;
}
r = Serial.read();
if (!checkIncommingData()) {
transmissionSuccess = false;
break;
}
g = Serial.read();
if (!checkIncommingData()) {
transmissionSuccess = false;
break;
}
b = Serial.read();
leds[idx].r = r;
leds[idx].g = g;
leds[idx].b = b;
#if ANALOG_OUTPUT_ENABLED == true && ANALOG_MODE == ANALOG_MODE_AVERAGE
sum_r += r;
sum_g += g;
sum_b += b;
#endif
}
// shows new values
if (transmissionSuccess) {
endTime = millis() + OFF_TIMEOUT;
#if MAX_LEDS > 1 ANALOG_OUTPUT_ENABLED == false
FastLED.show();
#endif
#if ANALOG_OUTPUT_ENABLED == true
#if ANALOG_MODE == ANALOG_MODE_LAST_LED
showAnalogRGB(leds[MAX_LEDS-1]);
#else
showAnalogRGB(CRGB(sum_r/MAX_LEDS, sum_g/MAX_LEDS, sum_b/MAX_LEDS));
#endif
#endif
}
}
} // end of setup
void loop() {
// Not used. See note in setup() function.
}
Leds leuchten nur weiß, schwach und sind sehr langsam, auch leuchten ca 80 led nicht
arduino uno
steuerungstyp: adalight
ledstrip: sk6812 rgbw
leds: 355
Was wurde falsch gemacht ?
Dachte mir schon, dass man das selbst zerlegen und implementieren muss, zum Glück ist das bei apks nicht soo schwer
Wo liegen die Effekte noch mal bei HyperBian?
Wieso hat man nicht alle Effekte in der Hyperioncontrol App 1.0.2 wie in der Hyperion Web Konfig ?
Kann man diese noch hinzufügen also nachträglich einpflegen...?
warum hat man mit der Hyperion App 2.1.2
mehr Effekte ?
die apps greifen lediglich auf die installiert Hyperion auf dem PI zu oder ist das nicht so..
wieso haben die apps unterschiedliche bzw nicht alle Effekte ?!
Hi Freund der Elektronischen Farben,
folgender Aufbau :
355x sk6812 rgbNW
20a 5v netzteil :
-Anfang & Ende Einspeisung beide mit jeweils 1000µF
wled
raspberry zero
Hyperion(neuste Version)
Hyperion Grapper 1.0 auf der Shield
-Priorität 155
-60fps
Effekte von wled und Hyperion laufen ohne Probleme Farben sind alle deutlich und ohne Flackern.
Nur beim Ambilight flackert es und die Farben sind recht hell bzw weißlich oder blass könnte man sagen.
Welche Settings, tippe mal bei wled, helfen Farben deutlicher darzustellen und vorallem was könnte das flackern beheben ?
man muss in der hyperion grapper app unter settings die priorität auf 150 stellen dann gehts
über die webUI klappt alles nur nicht über den Hyperion Grapper da funktioniert gar nix muss dazu nicht die Bildschirm Aufnahme aktiv sein ?
dtparam=audio=off war gesetzt. Aber danke fürs erinnern.
https://pastebin.com/WH28CJYW so richtig?
Wo liegt der Unterschied die leds per wled anzusteuern.
Nvidia Shield
Raspberry zero w
sk6812 rgb nw
wo find ich die log per pastebin ?
Hyperion Server:
- Build: (HEAD detached at 2.0.14) (LordGrey-c9a1c88/b109703-1669566414)
- Build time: Nov 27 2022 18:59:24
- Git Remote: https://github.com/hyperion-project/hyperion.ng
- Version: 2.0.14
- UI Lang: de (BrowserLang: de)
- UI Access: default
- Avail Screen Cap.: dispmanx,framebuffer,qt
- Avail Video Cap.: v4l2
- Avail Services: boblight,cec,effectengine,forwarder,flatbuffer,protobuffer,mDNS,SSDP,borderdetection
- Config path: /home/hyperion/.hyperion
- Database: read/write
Hyperion Server OS:
- Distribution: HyperBian GNU/Linux 11 (bullseye)
- Architecture: arm
- CPU Model: ARMv6-compatible processor rev 7 (v6l)
- CPU Type: Raspberry Pi Zero W Rev 1.1
- CPU Revision: 9000c1
- CPU Hardware: BCM2835
- Kernel: linux (5.15.76+ (WS: 32))
- Root/Admin: false
- Qt Version: 5.15.2
- Python Version: 3.9.2
- Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0
Alles anzeigen
Server wird zwar gefunden, aber keine leuchten der Leds
welche Einstellung im webUI sind dafür nötig, damit es laufen müsste?
Warum lässt sich die Bildschirm Aufnahme unter Hardware Aufnahme nicht aktivieren, die webUI refreshed sich sofort, sobald man den haken setzt.
Bitte um mini Guide für folgende Hardware.
Bekomme keine leds zum Leuchten
ist die app Hyperion Grapper auf der nvidia shield was Eigenständiges ?
am gpio 19 ist doch richig oder ?
spi is on
hardware :
raspi zero
Sk2812 rgb-nw
100watt netzteil
irgendein Problem mit dem Typ,
mit ws2812spi (4000000; 0.0) läuft es wirklich smooth
nur ist es ein sk6812 rgb-nw strip
mit typ sk6812spi sind die leds völlig durcheinander bunt und dunkler bei 300000;350000;4000000;5000000rate
settings
blacklist snd_bcm2835
spidev.bufsiz=1024000
dtparam=audio=off
probiere ich gleich ma
ohne voraktivierten ssh&user gehts auf Anhieb, vielen dank für die lösung.
mal wieder ein Display mit Ambilight ausstatteten.
habe 2022-11-27-HyperBian-lite mit pi imager 1.7.3 und nur in den erweiterten settings benutzername und pw gesetzt.
zwei verschiede pi´s ausprobiert und verschiedene sdcards
bekomme jeweils immer Hyperion status: Stopped und keinen zugriff per browser immer Zeitüberschreitung
wo hängt es ?
muss am HyperBian-lite image liegen mit anderen geht es
mit nicht HyperBian image
Traumhaft, so funktioniert es. Danke ?
kann man wled per batchdatei steuern? On und Off würde schon reichen.
Ist Arduino bei den leds begrenzt?
Wie minimalistisch könnte man Ledsysteme aufbauen, wenn man nur Licht-, Effekte wie Kaminfeuer, Sunrise oder eigene laufen lassen möchte?
Bei Kodi auf einem pi4 mit sk6812 leds funktioniert doch ambilight ohne grabber, oder ?!
Ola',
gibt es mittlerweile ein KISS Setup (keep it super simple) bei uhd mit raspberry ambilight ?
mit arduino und ambibox ruckelt es mir zu sehr.