ich setze ich jetzt an das script für den arduino
… und ich nehme an, Du nutzt kein Mischpult?
doch, aber ein analoges
Berhinger x1622
ich hasse dieses dinge, wird aber bald zu einem yamaha wahrscheinlich gewechselt
Dann brauchst Du doch mAirlist gar nicht in Deine Überlegungen einzubeziehen?!?
Die Govee strips die ich kenne sind alle samt Pixelstrips. Mit einem Relais kannst Du da gar nichts ausrichteten und da Dir insgesamt die Basics fehlen, ist das Projekt 2 Nummern zu groß für Dich.
Ein Arduino UNO oder Mega redet mit Sicherheit auch nicht http, die Reden maximal seriell. Bei einem Mega vielleicht noch mit einem Ethernet shield aber ich bezweifle dass Du das programmiert bekommst.
Du kannst das ausprobieren, indem Du in die Adresszeile Deines Webbrowsers http://<IP des Arduinos>/ROT
eingibst. Bzw. …/GRN
. Dann sollten die LED umschalten.
hab den Ardu gerade nicht da
Ich gebe den Code Dann Frei, wenn es geht
Ich hab nun eine Lichtsteuerung gebaut, die aber noch in der Alpha Version ist!
Der Arduino wird mittels Com Port, also über USB vom PC gesteuert.
Dafür nutze ich einen Arduino Nano mit einem LED Streifen, den man mit Commands und nicht mit Relais ansteurt (hat den Sinn, Leises Studio)
Dies ist der Code für den Arduino:
#include <Adafruit_NeoPixel.h>
#define PIN 2
#define NUMPIXELS 100
int SerialData = 0;
unsigned long currentMillis = millis();
unsigned long previousMillis = 0;
static boolean Flag = false;
boolean setBlink = false;
boolean isBlinking = false;
String prevAction = "color";
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_RGB + NEO_KHZ800);
void setup() {
Serial.begin(9600);
pixels.begin();
pixels.clear();
pixels.show();
}
void loop() {
// Toggle setBlink to off to stop blinking
// We can add a timer here to setBlink = false
// Right now it will blink forever. initialize setBlink to false
if(setBlink) {
if(prevAction == "off") {
colorInstant(pixels.Color(0, 0, 255));
prevAction = "color";
} else {
delay(500);
colorInstant(pixels.Color(0, 0, 0));
delay(500);
prevAction = "off";
}
}
if (Serial.available() > 0) {
SerialData = Serial.read();
char Zeichen = (char)SerialData;
//Rainbow
if (Zeichen == 'a') {
setBlink = false;
rainbow(20);
delay (20);
colorInstant(pixels.Color(0, 0, 0));
}
// Schwarz
if (Zeichen == 'b') {
setBlink = false;
colorInstant(pixels.Color(0, 0, 0));
}
// Rot
if (Zeichen == 'r') {
setBlink = false;
colorInstant(pixels.Color(0, 255, 0));
}
// Hellgruen
if (Zeichen == 'u') {
setBlink = false;
colorInstant(pixels.Color(255, 255, 0));
}
// Gruen
if (Zeichen == 'g') {
setBlink = false;
colorInstant(pixels.Color(255, 0, 0));
}
// Blau
if (Zeichen == 'l') {
colorInstant(pixels.Color(0, 0, 255));
}
// Blink sektion
if (Zeichen == 'e') {
setBlink = true;
}
if (Zeichen == 'f') {
setBlink = true;
}
}
}
/* ********************************
* ***********FUNKTIONEN***********
* ********************************/
//ColorWipe
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < 100; i++) {
unsigned long start = millis();
while (millis() - start <= wait) {
yield();
pixels.setPixelColor(i, c);
pixels.show();
}
}
}
// Color Instant
void colorInstant(uint32_t c) {
for (uint16_t i = 0; i < 100; i++) {
pixels.setPixelColor(i, c);
}
pixels.show();
}
//Rest
void rainbow(uint8_t wait) {
uint16_t i, j;
for (j = 0; j < 256; j++) {
for (i = 0; i < 100; i++) {
pixels.setPixelColor(i, Wheel((i * 1 + j) & 255));
}
pixels.show();
delay(wait);
}
}
uint32_t Wheel(byte WheelPos) {
if (WheelPos < 85) {
return pixels.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
else if (WheelPos < 170) {
WheelPos -= 85;
return pixels.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
else {
WheelPos -= 170;
return pixels.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}
void instantWhiteOn() {
for (uint16_t i = 0; i < 100; i++) {
pixels.setPixelColor(i, 255, 255, 255);
}
pixels.show();
}
void instantOff() {
for (uint16_t i = 0; i < 100; i++) {
pixels.setPixelColor(i, 0, 0, 0);
}
pixels.show();
}
Und dies ist der Script für mAirlist:
procedure OnLoad;
begin
ComPort('COM5').Open;
ComPort('COM5').SendStr('a');
end;
// Player A und Player B Start
procedure OnPlayerStart(PlaylistIndex: integer; PlayerIndex: integer; Item: IPlaylistItem);
begin
if PlayerIndex = 0 then begin
ComPort('COM5').SendStr('g');
end;
if PlayerIndex = 1 then begin
ComPort('COM5').SendStr('g');
end;
end;
// Player A und Player B Stop
procedure OnPlayerStop(PlaylistIndex: integer; PlayerIndex: integer; Duration: TTimeValue; Item: IPlaylistItem);
begin
if PlayerIndex = 0 then begin
ComPort('COM5').SendStr('b');
end;
if PlayerIndex = 1 then begin
ComPort('COM5').SendStr('b');
end;
end;
// EOF Warnung
procedure OnPlayerEOFWarning(PlaylistIndex: integer; PlayerIndex: integer);
begin
if PlayerIndex = 0 then
begin
ComPort('COM5').SendStr('e');
end;
if PlayerIndex = 1 then
begin
ComPort('COM5').SendStr('e');
end;
end;
// PFL an
procedure OnPFLOn(Item: IPlaylistItem; PFLCount: integer);
begin
ComPort('COM5').SendStr('l');
end;
// PFL aus
procedure OnPFLOff(Item: IPlaylistItem; PFLCount: integer);
begin
ComPort('COM5').SendStr('g');
end;
//Mic an
procedure OnOnAir;
begin
ComPort('COM5').SendStr('r');
end;
//Mic aus
procedure OnOffAir;
begin
ComPort('COM5').SendStr('b');
end;
// schaltet Ampel aus
procedure OnUnload;
begin
ComPort('COM5').SendStr('b');
end;
begin
end.
Eigentlich sollte der Code gut erklärt sein, da ich über jede neue Sektion etwas drüber geschrieben habe.
Viel Spaß beim nutzen!
Mfg
Wiso veröffentlichst du nen Script was ich dir mal geschickt habe und mit nem Freund zusammen gebaut habe?!
Also sowas find ich echt lächerlich.
So etwas bitte auf anderen Kanälen und, sofern möglich, im direken Kontakt klären.
Dieses Forum ist kein guter Austragungsort für etwaige Diskussionen über die Urheberschaft (höchstens eine von allen Seiten getragene Richtigstellung sowie eine Bitte um Entschuldigung, falls zutreffend und notwendig).
Vielen Dank.