From 4c9e1cba8cff155e287260b2dbd8130c6686b63f Mon Sep 17 00:00:00 2001 From: eaman Date: Mon, 12 Dec 2016 10:30:42 +0100 Subject: [PATCH] edit --- RGB_LED/rgb_5_struct/rgb_5_struct.ino | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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); } */ -- 2.39.2