Wie kommt man zu JINX! Ardunio zu erkennen? Welches Gerät habe ich in Jinx gewählt? Vielen Dank
vuluminus:
Hallo, momentan habe ich den Versuch vor mir aufgebaut mit 512 LED.
Arduino Mega und Jinx.
Es kommt auch was an, aber nicht ganz korrekt.
Wenn ich zum Beispiel die Farbe Rot auswähle, Flickert es zuwischendurch immer wieder eine andere Farbe rein.
hier noch der Arduino Sketch
#include "FastLED.h" //Library with code for enabling the leds.
#define NUM_LEDS 512 //16*16=256 leds.
#define DATA_PIN 6 // Change if necessary, stands for the pinout you've chosen on the arduino.
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(1250000); // Possible to change, but must be the same as in Jinx, otherwhise the serial connection doesn't run at the same speed ---> error!
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); // If you use other leds, change it here.
}
int serialJinx () {
while (!Serial.available()) {}
return Serial.read();
}
void loop() {
while (serialJinx () != 1) {}
for (int i=0; i < NUM_LEDS; i++) {
leds[i].r = serialJinx ();
leds[i].g = serialJinx ();
leds[i].b = serialJinx ();
}
FastLED.show();
}
-----------------------
vuluminus:
Hallo, momentan habe ich den Versuch vor mir aufgebaut mit 512 LED.
Arduino Mega und Jinx.
Es kommt auch was an, aber nicht ganz korrekt.
Wenn ich zum Beispiel die Farbe Rot auswähle, Flickert es zuwischendurch immer wieder eine andere Farbe rein.
hier noch der Arduino Sketch
#include "FastLED.h" //Library with code for enabling the leds.
#define NUM_LEDS 512 //16*16=256 leds.
#define DATA_PIN 6 // Change if necessary, stands for the pinout you've chosen on the arduino.
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(1250000); // Possible to change, but must be the same as in Jinx, otherwhise the serial connection doesn't run at the same speed ---> error!
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); // If you use other leds, change it here.
}
int serialJinx () {
while (!Serial.available()) {}
return Serial.read();
}
void loop() {
while (serialJinx () != 1) {}
for (int i=0; i < NUM_LEDS; i++) {
leds[i].r = serialJinx ();
leds[i].g = serialJinx ();
leds[i].b = serialJinx ();
}
FastLED.show();
}
-----------------------