Go to Post You can take my blocker... but you can never take my cheesecake! - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2014, 11:23
jalmos jalmos is offline
Registered User
FRC #4166
 
Join Date: Jan 2012
Location: Mora
Posts: 79
jalmos is an unknown quantity at this point
LED Programming ? Help Please.

We are a semi rookie team and need some help. We ordered this LED kit from AndyMark….
8.2ft RGB LED light strip complete kit with arduino controller (am-2645)

We are in need of help with the programming using Lab View.

Could anyone out there be so kind as to send us a programming digram in Labview to make this work or a link that could help us learn to program this component. Thanks for all your time and help

Go team

Jalmos
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2014, 11:35
ehochstein's Avatar
ehochstein ehochstein is offline
Coach, Volunteer & Mentor
AKA: Evan Hochstein
FTC #5943 (ESGM)
Team Role: Coach
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Bloomington, Minnesota
Posts: 933
ehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant futureehochstein has a brilliant future
Re: LED Programming ? Help Please.

It looks like AndyMark offers some example code at https://github.com/AndyMark/AndyMark...es/tree/master it is Arduino code as that is what the kit comes with.

I would say before you put this system on your robot, get it working with the Arduino and AM example code first.
__________________
Minnesota FIRST Senior Mentor | 2013-?

Stratasys Applications Engineering Technician | 2016-?

2009 Regional Win – 2470 @ 10k Lakes (Thanks 2826 and 1714)
2013 WFFA Recipient – 2470 @ 10K Lakes
2016 Ri3D: 'Snow Problem Reveal
2017 Ri3D: 'Snow Problem Reveal

The opinions expressed above are the personal opinions of the author and do not necessarily represent the views and opinions of any organization the author is affiliated with.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2014, 11:43
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 750
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: LED Programming ? Help Please.

Our programming team is doing the same thing. Here is the advice I gave them.

There are two parts to this.
PART #1. Programming the LED lights to do what you want. Like light "behaviors" let's call them.
PART #2. Interfacing the CRIO to "trigger" the arduino to run a behavior.

Part #1 should consist of you writing code in the arduino to make your LED lights do what you want them do to.
For example write down the behaviors.
1. Robot is idle
2. Robot is shooting
3. Robot has the ball
Now write the code to make the LED lights do what you want for each behavior, then place them into a while loop with a CASE SELECT structure.

CASE 0
Robot is idle
CASE 1
Robot is shooting
CASE 2
Robot has the ball

etc...

Part #2 is setting up, wiring and programming an interface in the CRIO...
There are three INTERFACING suggestions I can suggest.

SIMPLE INTERFACE
Wiring the output pin of the CRIO to the INPUT pin on the arduino.
Map the CASE SELECTs to a digital input on the arduino.
Then in the LABVIEW program, just turn on a digital output that is wired directly to the arduino.

IN1 = trigger idle state
IN2 = trigger robot shooting
IN3 = trigger robot has the ball

This interfacing method is called discret wiring I/O. It's the simplest interface of the THREE interface suggestions I have for you below.

INTERMEDIATE INTERFACE
A stepup from that would be to do a BCD (binary coded decimal) ENCODE from the CRIO to a DECODE in the arduino. The advantage is you can have 8 robot behaviors with only three wires connected. It's technically the same as discret, however you're not chewing up a bunch of wires to get more behaviors.

Wiring I/O on the Digital Sidecar sample.
(least signaficate bit on right)
BINARY VALUE 4, 2, 1, etc...

IN3, IN2, IN1
0,0,0 = 0 decimal
0,0,1 = 1 decimal
0,1,0 = 2 decimal
0,1,1 = 3 decimal
1,0,0 = 4 decimal
1,0,1 = 5 decimal
1,1,0 = 6 decimal
1,1,1 = 7 decimal

ADVANCED INTERFACE
One more suggestion would be to write an I2C interface.

In this case, you will need to include the wire library and setup a SLAVE ADDRESS to the arduino and have the CRIO become the MASTER and set memory bits.

http://arduino.cc/en/reference/wire

So first you have to decide how you want to interface the two processors together. That's the root decision you need to make first.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369

Last edited by Chris_Elston : 03-02-2014 at 11:45.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi