WS2801 + Uno Einsteigerhilfe

Hi Leute!

Ich hab mal mit 4 einzelnen normalen Leds eine U-no ausgestattet, tja mehr kann ich nicht.

Hoffe hierbei auf eure Hilfe

Was möchte ich machen:
Ein Schild mit 48 Led umrahmen

hab diese Lichterkette WS2801 bestellt

https://de.aliexpress.com/item/5v-waterproof-IP68-12mm-ws2801-pixel-module-50-node-chain-digital-led-rgb-full-color-individually/32802254290.html?spm=2114.13010208.99999999.271.fimfVC

ich möchte diese gerne mit einen UNO betreiben

jetzt ist natürlich die Frage

a: wie anlöten am UNO

b: ich möchte so einen klassischen Lauflichteffekt a la US Schilder der 70-er 80-er

Beispiel

Könnte mir jemand von euch da weiterhelfen, evtl. mit einen Beispiellose

oder gibts eine Seite mit einen TUT

Als erstes wird man ja mal konfigurieren müssen wieviele leds man hat usw

am ende soll, wenn das Schild am Strom angeschlossen wird das sofort laufen ohne nachher noch eine Taste drücken zu müssen.

danke
tom

Wenn Du Effekte auf LED-Stripes machen willst, ist das Beste die FastLED-Lib.
Die unterstützt auch die 2801 (unter ältere aber noch unterstützte Typen).

Dort findest Du auch Codebeispiele.

Wenn Dir das zu komplex ist, findest Du auch genug Beispiele über Google "WS2801 arduino", z.B. die Lib von ADAFruit.
In den Libs sind auch immer Beispiele dabei, mit denen Du erst mal Deinen Aufbau testen kannst und die Du dann nach Deinen Vorstellungen erweitern kannst.

Gruß Tommy

oder gibts eine Seite mit einen TUT

Gehe auf 12mm Diffused Thin Digital RGB LED Pixels (Strand of 25) [WS2801] : ID 322 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits

und klicke da auf den "Learn" Link!

Data und Clock kannst Du an jeden Ausgangspin anschließen, es muss nicht 11/13 sein.

Wenn die FastLED Examples bei Dir laufen, reden wir über den Lauflichteffekt.

Gruß, Helmuth

edit: Das 5V Netzteil sollte mindestens 3A (50x3x20mA) liefern können.

danke

ich melde mich dann

das zeug ist mal bestellt

tom

hi Leute!

Ich ab deb Uno + Strippe plus Adafruit Samplecode von hier

https://learn.adafruit.com/12mm-led-pixels/code

nun am laufen

jetzt würde ich gern mit 49 Leds so einen Code
zusammenbekommen

bin aber kein Programmierer :frowning:

könnt mir da we helfen bitte

danke
tom

Nimm mal besser FastLED und schau Dir schonmal die mitgelieferten Beispiele an.

werd ich machen

nur frag ich mich grad ob das Sinn macht mich stundenlang da reinzusteigern oder soll ich lieber um 10,- einen Controller bei ALI bestellen?

da ich wohl dann ewig nix mehr mit en Leds machen werde

dachte evtl hat jemand den passenden Schnipsel Code für sowas zur hand

na ja ich schau dann mal ob ich diesen code ans laufen bekomme

nur kann ich denn dann eh nicht wirklich selber editieren

:frowning:

also die Fast led laufen bei mir gar nicht
je nach example funktioniert maximal die 1 Led und die leuchtet nur wirr

data clock pins hab ich richtig eingetragen !?!

komm da leider nicht weiter

also das einzige was ich ansl laufen bekomme ist von adafruit dieser code

#include "Adafruit_WS2801.h"
#include "SPI.h" // Comment out this line if using Trinket or Gemma
#ifdef __AVR_ATtiny85__
#include <avr/power.h>
#endif

/*****************************************************************************
Example sketch for driving Adafruit WS2801 pixels!


 Designed specifically to work with the Adafruit RGB Pixels!
 12mm Bullet shape ----> https://www.adafruit.com/products/322
 12mm Flat shape   ----> https://www.adafruit.com/products/738
 36mm Square shape ----> https://www.adafruit.com/products/683

 These pixels use SPI to transmit the color data, and have built in
 high speed PWM drivers for 24 bit color per pixel
 2 pins are required to interface

 Adafruit invests time and resources providing this open source code, 
 please support Adafruit and open-source hardware by purchasing 
 products from Adafruit!

 Written by Limor Fried/Ladyada for Adafruit Industries.  
 BSD license, all text above must be included in any redistribution

*****************************************************************************/

// Choose which 2 pins you will use for output.
// Can be any valid output pins.
// The colors of the wires may be totally different so
// BE SURE TO CHECK YOUR PIXELS TO SEE WHICH WIRES TO USE!
uint8_t dataPin  = 2;    // Yellow wire on Adafruit Pixels
uint8_t clockPin = 3;    // Green wire on Adafruit Pixels

// Don't forget to connect the ground wire to Arduino ground,
// and the +5V wire to a +5V supply

// Set the first variable to the NUMBER of pixels. 25 = 25 pixels in a row
Adafruit_WS2801 strip = Adafruit_WS2801(50, dataPin, clockPin);

// Optional: leave off pin numbers to use hardware SPI
// (pinout is then specific to each board and can't be changed)
//Adafruit_WS2801 strip = Adafruit_WS2801(25);

// For 36mm LED pixels: these pixels internally represent color in a
// different format.  Either of the above constructors can accept an
// optional extra parameter: WS2801_RGB is 'conventional' RGB order
// WS2801_GRB is the GRB order required by the 36mm pixels.  Other
// than this parameter, your code does not need to do anything different;
// the library will handle the format change.  Examples:
//Adafruit_WS2801 strip = Adafruit_WS2801(25, dataPin, clockPin, WS2801_GRB);
//Adafruit_WS2801 strip = Adafruit_WS2801(25, WS2801_GRB);

void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000L)
 clock_prescale_set(clock_div_1); // Enable 16 MHz on Trinket
#endif

 strip.begin();

 // Update LED contents, to start they are all 'off'
 strip.show();
}


void loop() {
 // Some example procedures showing how to display to the pixels
 
 colorWipe(Color(255, 0, 0), 50);
 colorWipe(Color(0, 255, 0), 50);
 colorWipe(Color(0, 0, 255), 50);
 rainbow(20);
 rainbowCycle(20);
}

void rainbow(uint8_t wait) {
 int i, j;
  
 for (j=0; j < 256; j++) {     // 3 cycles of all 256 colors in the wheel
   for (i=0; i < strip.numPixels(); i++) {
     strip.setPixelColor(i, Wheel( (i + j) % 255));
   }  
   strip.show();   // write all the pixels out
   delay(wait);
 }
}

// Slightly different, this one makes the rainbow wheel equally distributed 
// along the chain
void rainbowCycle(uint8_t wait) {
 int i, j;
 
 for (j=0; j < 256 * 5; j++) {     // 5 cycles of all 25 colors in the wheel
   for (i=0; i < strip.numPixels(); i++) {
     // tricky math! we use each pixel as a fraction of the full 96-color wheel
     // (thats the i / strip.numPixels() part)
     // Then add in j which makes the colors go around per pixel
     // the % 96 is to make the wheel cycle around
     strip.setPixelColor(i, Wheel( ((i * 256 / strip.numPixels()) + j) % 256) );
   }  
   strip.show();   // write all the pixels out
   delay(wait);
 }
}

// fill the dots one after the other with said color
// good for testing purposes
void colorWipe(uint32_t c, uint8_t wait) {
 int i;
 
 for (i=0; i < strip.numPixels(); i++) {
     strip.setPixelColor(i, c);
     strip.show();
     delay(wait);
 }
}

/* Helper functions */

// Create a 24 bit color value from R,G,B
uint32_t Color(byte r, byte g, byte b)
{
 uint32_t c;
 c = r;
 c <<= 8;
 c |= g;
 c <<= 8;
 c |= b;
 return c;
}

//Input a value 0 to 255 to get a color value.
//The colours are a transition r - g -b - back to r
uint32_t Wheel(byte WheelPos)
{
 if (WheelPos < 85) {
  return Color(WheelPos * 3, 255 - WheelPos * 3, 0);
 } else if (WheelPos < 170) {
  WheelPos -= 85;
  return Color(255 - WheelPos * 3, 0, WheelPos * 3);
 } else {
  WheelPos -= 170; 
  return Color(0, WheelPos * 3, 255 - WheelPos * 3);
 }
}

tja

mit fastleid komm ich nicht weiter

mit dem obigen Code funktionieren die Leds alle

aber der Code gibt halt nicht viel her bzw der Effekt passt nicht für mich

falls jemand Ideen hat oder bereit ist mir da zu helfen wär ich sehr dankbar

lg
tom

so

hab jetzt auch 2 codes von fastleid ans laufen bekommen

// Use if you want to force the software SPI subsystem to be used for some reason (generally, you don't)
// #define FASTLED_FORCE_SOFTWARE_SPI
// Use if you want to force non-accelerated pin access (hint: you really don't, it breaks lots of things)
// #define FASTLED_FORCE_SOFTWARE_SPI
// #define FASTLED_FORCE_SOFTWARE_PINS
#include "FastLED.h"

///////////////////////////////////////////////////////////////////////////////////////////
//
// Move a white dot along the strip of leds.  This program simply shows how to configure the leds,
// and then how to turn a single pixel white and then off, moving down the line of pixels.
// 

// How many leds are in the strip?
#define NUM_LEDS 50

// Data pin that led data will be written out over
#define DATA_PIN 2

// Clock pin only needed for SPI based chipsets when not using hardware SPI
#define CLOCK_PIN 3

// This is an array of leds.  One item for each led in your strip.
CRGB leds[NUM_LEDS];

// This function sets up the ledsand tells the controller about them
void setup() {
	// sanity check delay - allows reprogramming if accidently blowing power w/leds
   	delay(2000);

      // Uncomment 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<APA104, DATA_PIN>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2811_400, 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<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903B, 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<P9813, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<DOTSTAR, 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);
      // FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<DOTSTAR, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}

// This function runs over and over, and is where you do the magic to light
// your leds.
void loop() {
   // Move a single white led 
   for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
      // Turn our current led on to white, then show the leds
      leds[whiteLed] = CRGB::White;

      // Show the leds (only one of which is set to white, from above)
      FastLED.show();

      // Wait a little bit
      delay(100);

      // Turn our current led back to black for the next loop around
      leds[whiteLed] = CRGB::Black;
   }
}

ist halt ein weisses lauflicht das im Kreis läuft

müsste dann halt

  1. warmweiss sein und mehrere Leds laufen lassen wie am Video

hat wer Ideen dazu

oder gibts für so was nen Editor zum Malen wie ein Laufvideo ?

so ich push es noch mal hoch

falls wer das machen kann, ich zahl auch was dafür oder Forumsspende

das macht so keinen Sinn

ich finde keinen passenden fertigen code den ich adaptieren kann

und für mehr fehlt mir das Wissen

prinzipiell läuft der Adafruit oder fastleid code

aber mehr als Cyclo lauflicht
und durchfadeeffekte alle Leds

bring ich nicht zusammen

freaktech:
so ich push es noch mal hoch

Du machst Dich unsympatisch.
Grüße Uwe

sorry

will ich nicht

bin jetzt eh ein paar Tage auf Urlaub, ärgert mich halt, dass ich es nicht hinbekommen habe