View Single Post
  #4   Spotlight this post!  
Unread 14-12-2011, 11:29
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Arduino help -RGB LED

A couple more things that I found that are going to give you problems.

You're declaring ledState variables inside the pushCounter conditions within the loop. It looks like you're intending to try to maintain that state between loops and this will not accomplish that. You're already declaring a global ledState at the top, why are you redeclaring and reinitializing them again in the conditions?

The same goes for previousSlowMillis and previousFastMillis. They will always be 0 since you're reinitializing them every loop.