View Single Post
  #3   Spotlight this post!  
Unread 07-03-2015, 18:45
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Decoration, preference for LEDs

If you're using java, or don't mind converting some simple code, here is our source code for the non-addressable LEDs. Most of the methods are just one or two functional lines; only setAllianceColors() is longer. Our LED strips have a common positive line and separate negative lines for the red, green, and blue elements. We have connected these four wires to the four motor outputs of two spike relays. Here's the mapping for the code as found at the link:
  • Common: M- output of spike on relay port 2
  • Blue negative: M+ output of spike on relay port 2
  • Green negative: M- output of spike on relay port 3
  • Red negative: M+ ouput of spike on relay port 3

If you use LED strips with common negative line, swap all the kOffs for kOns and all the kReverses with kForwards.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 07-03-2015 at 18:47. Reason: common negative clues