Go to Post Almost as if there's...co-opertition? - Michael Hill [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 12-27-2015, 05:47 PM
klink135's Avatar
klink135 klink135 is offline
The one dat pushes da buttons
AKA: Max Jorgensen
FRC #5050 (Cow Town Robotics)
Team Role: Programmer
 
Join Date: Jul 2015
Rookie Year: 2015
Location: Carleton, MI
Posts: 14
klink135 is an unknown quantity at this point
Question Roborio/Arduino communication via DIO

Hi. Our team for the preseason is trying to use an arduino to control leds based on what buttons we press on the remote. I read somewhere that some teams do this through DIOs on the roborio to arduino. How would I code this in Labview? What do I need to code on the Arduino to make it work?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-27-2015, 06:37 PM
Ari423's Avatar
Ari423 Ari423 is online now
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 518
Ari423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant future
Re: Roborio/Arduino communication via DIO

You would write to digital outputs in LabVIEW on the roboRIO and then read them in using digital inputs on the Arduino. The more DIO pins you relegate for this task, the more distinct color states you can choose (2^n different states).
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


Reply With Quote
  #3   Spotlight this post!  
Unread 12-28-2015, 07:39 PM
headlight headlight is offline
Registered User
no team
 
Join Date: May 2013
Rookie Year: 2012
Location: Rochester Hills, MI
Posts: 69
headlight is an unknown quantity at this point
Re: Roborio/Arduino communication via DIO

You might be able to use a DIO to output a PWM signal, then read that signal with the arduino. (Or if you can spare a PWM port, you could use that). This would give you many more options for colors without tying up a bunch of outputs.

Here is some code to read PWM with the arduino (I haven't tried it, but I have done something similar with an adruino). https://gist.github.com/ivarvong/8202180

For the labview code you can probably use Pulse.vi. (Page 22-4 in this document, the newer version of labview should have an equivalent vi: http://www.ni.com/pdf/manuals/372668d.pdf).
Reply With Quote
  #4   Spotlight this post!  
Unread 12-29-2015, 04:54 PM
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 271
Bpk9p4 is on a distinguished road
Re: Roborio/Arduino communication via DIO

i would suggest using i2c to talk to the Arduino This is what we did last year and it worked great. The other great things about this is you will not use up your DIO on the roborio and you can have a lot more features.
__________________
2015 Midwest Regional Finalist
2015 Central Illinois Regional Winner
2015 Newton Division Finalist
2015 Newton Quality Award
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 06:08 PM.

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