#RGBLEDnodemcu

Dernière modification : 2017/11/24 17:06


const int RED = D1;
const int GREEN = D2;
const int BLUE = D3;

void setup() {
        pinMode(RED, OUTPUT);
        pinMode(GREEN, OUTPUT);
        pinMode(BLUE, OUTPUT);
}

void loop() {
        analogWrite(RED, 50);
        analogWrite(GREEN, 50);
        analogWrite(BLUE, 200);
        delay (1000);
        analogWrite(RED, 100);
        analogWrite(GREEN, 100);
        analogWrite(BLUE, 100);
        delay (1000);
}