I've been working on this project for the past week using an Arduino Uno (for testing purposes) with the intention of switching over to a 3V Trinket. I've attached my code below as well as a image of what my set up looks like. I'm using 6 Diffused RGB 5mm LED, a 3V Trinket, an Arcade Button - 30mm Translucent Green, and 2 x 2032 Coin Cell Battery Holder - 6V output with On/Off switch (I am only using a single CR 2032 so only 3V total with a piece of tin foil in the other side). The resistors are 510 Ohms for each of the RGB pins and 10K for the button, in case they are hard to see on the image. I'm not really sure what could be wrong and I know that makes this a really open ended problem but any help would be greatly appreciated. If it helps at all I am pretty sure all the soldering is adequate as I can set all the colors I want via the setColor() function but as soon as I implement the checkButtonState() at the beginning things start getting weird. Instead of me being able to cycle the colors via a button push it cycles through all the colors like the button is being spam clicked.
Bradleys_Code.ino (5.51 KB)