From: eaman Date: Mon, 12 Dec 2016 09:30:42 +0000 (+0100) Subject: edit X-Git-Url: http://git.piffa.net/web?a=commitdiff_plain;h=4c9e1cba8cff155e287260b2dbd8130c6686b63f;p=sketchbook_andrea edit --- diff --git a/RGB_LED/rgb_5_struct/rgb_5_struct.ino b/RGB_LED/rgb_5_struct/rgb_5_struct.ino index fa8ef10..8c334e1 100644 --- a/RGB_LED/rgb_5_struct/rgb_5_struct.ino +++ b/RGB_LED/rgb_5_struct/rgb_5_struct.ino @@ -52,10 +52,10 @@ void loop() * 1. struct ledRGB { - byte r; - byte g; - byte b; - byte blue; + byte rPin ; // PINS + byte gPin; + byte bPin; + byte blue; // Colors byte green; byte red; }; @@ -66,15 +66,15 @@ ledRGB led {0,255,255,9,10,11}; void setup() { - pinMode(led.blue, OUTPUT); - pinMode(led.green, OUTPUT); - pinMode(led.red, OUTPUT); + pinMode(led.Pin, OUTPUT); + pinMode(led.Pin, OUTPUT); + pinMode(led.Pin, OUTPUT); } void loop() { - analogWrite(led.red,led.r ); - analogWrite(led.green,led.g); - analogWrite(led.blue,led.b); + analogWrite(led.rPin,led.red ); + analogWrite(led.gPin,led.green); + analogWrite(led.bPin,led.blue); } */