Hello to everyone!
My name is Martin and I just registered here since the problem I'm currently facing with my Arduino Lilypad is driving me crazy and I can't find solution over the Internet.
My project involves 3 RGB LEDs which i want to control in this way: pressing red button will turn on all LEDs in red colour, green button will turn on all LEDs in green colour and so on (I wonder if it's possible to also program a button which will turn LEDs randomly?)
OK, how i connected everything: Each R G B pin is connected to different digital I/O (so to sum up i used 9 pin slots on my Lilypad board) plus last pin of each LED to (+) on tab. 4 basic buttons/ switches to 4 different digital I/O and to (-) tab on my Lilypad board.
I tried example codes but everything I came to was that: after compiling the program for let's say one button, it immediately lighted one diode and the switch only turned off LED and after that diode again started to shine. I would like to achieve a situation like when I press the button the RGB LED will turn on, when i press the same button again it will turn off or by pressing other button will change the colour to different one (for example I pushed red button and the all LEDs turned on red and now I'm pressing blue button and the all LEDs turn into blue colour.
Is there any wrong connection or something like that.? Any suggestions what I can do? I'm not so good in programming and electronics but I would like to try to finish that project. Thanks so much in advance and for your time and for any tips :)
Best regards, Martin