//#include <EasyNextionLibrary.h>
//#include <trigger.h>
#include <Wire.h>
//---------------------------------- VARIABLES -----------------------------------//
int LedPinRed = 9; // Led-Pin 1 an Arduino-Pin D9 angeschlossen
int LedPinGreen = 10; // Led-Pin 3 an Arduino-Pin D10 angeschlossen
int LedPinBlue = 11; // Led-Pin 4 an Arduino-Pin D11 angeschlossen
//char button [7] = {};
//------------------------------------ SETUP -------------------------------------//
void setup()
{
pinMode(LedPinRed, OUTPUT); // Digital-Pin D9 als 'Output' konfigurieren
pinMode(LedPinGreen, OUTPUT); // Digital-Pin D10 als 'Output' konfigurieren
pinMode(LedPinBlue, OUTPUT); // Digital-Pin D11 als 'Output' konfigurieren
//Serial.begin(9600);
//String cmd;
//Serial.print()
}
//------------------------------------ SETUP -------------------------------------//
void loop()
{
setColorLed1(255, 0, 0); // Rot an
delay(1000);
setColorLed1(0, 255, 0); // Grün an
delay(1000);
setColorLed1(0, 0, 255); // Blau an
delay(1000);
setColorLed1(255, 255, 255); // Weiß an
delay(1000);
setColorLed1(0, 0, 0); // Led aus
delay(1000);
setColorLed1(255, 255, 0); // Gelb an
delay(1000);
setColorLed1(255, 0, 255); // Violett an
delay(1000);
setColorLed1(0, 255, 255); // Hellblau an
delay(1000);
}
void setColorLed1(int RedVal, int GreenVal, int BlueVal)
{
analogWrite(LedPinRed, RedVal); // PWM-Ausgabe an Digital-Pin D9 (255 = 100% DutyCycle, 127 = 50%, 0 = 0%)
analogWrite(LedPinGreen, GreenVal); // PWM-Ausgabe an Digital-Pin D10 (255 = 100% DutyCycle, 127 = 50%, 0 = 0%)
analogWrite(LedPinBlue, BlueVal); // PWM-Ausgabe an Digital-Pin D11 (255 = 100% DutyCycle, 127 = 50%, 0 = 0%)
}