Go to Post ...instead of question marks swirling my mind I got triangles, circles and squares... - Dorienne [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #21   Spotlight this post!  
Unread 03-04-2011, 01:33
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: Arduino and LabVIEW

Quote:
Originally Posted by Roger View Post
Currently I'm getting a semi-random highs/lows, even without pressing the button...
This sounds VERY much like your pin is floating. This is not really a programming issue, but a wiring/electrical issue.

Watch this video, note why he uses the resistor. If you get it, good, otherwise, I'll explain:
Originally Posted by Roger
But aren't they both using an on/off electical signal to talk between them? Not code.

Yes and no. The cRIO will send out an on/off electrical signal, but the Arduino DIO pin does not "sense" "on or off." It senses 5v or Ground. If you hook it up to nothing (what you may call "off"), it will basically sense the voltage of the wire/air that it is connected to. Ever looked at a volt meter when you haven't yet hooked it up to a power source? It wanders all over the place. This is what your Arduino DIO pin is doing. It could be anything, high or low. You need to use a resistor to specifically connect the DIO pin to Ground when it isn't sensing a 5v from the cRIO DIO pin. This is called using a pull-down resistor (not to be confused with a pull-up resistor, but similar idea).

Do you have a mentor who is an electrical engineer or knows electronics? You should have him help you out. This concept is a little tricky, it took me a while to figure out. Before that I was thinking the same as you.
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW

Last edited by RoboMaster : 03-04-2011 at 01:35.
Reply With Quote
 


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 13:11.

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