Go to Post Was it supposed to go all sparkly and smokey like that? - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #6   Spotlight this post!  
Unread 15-03-2004, 13:52
bstempi bstempi is offline
Captain
#0708 (Hardwired Hatters)
Team Role: Student
 
Join Date: Feb 2004
Location: Horsham, Pa
Posts: 23
bstempi is an unknown quantity at this point
Send a message via AIM to bstempi
Re: wiring and installing a sensor

Quote:
Originally Posted by jacob_dilles
the banner sensors that first gives us are tricky little felers. the are IR, and have a built in source which makes it nice and easy. they run on 12v and out put 5 to a normaly open and a normaly closed output. in order to wire it do the following:

brown wire - this is the postitive. connect it to +12V
blue wire - this is the negitive. connect it to ground (on the battery)
black wire - N.O. wire
white wire - N.C. wire

you then can choose between N.O. and N.C. (it REALY doesnt matter). you connect the one you choose to the digital in. for our sake, were gonna say you plug it into digital input 10.

now to code it, in the code first you have to set it as an input. this is done for you in the default code:

Code:
digital_io_10 = 1;
(autonomus or otherwise) you can look at the variable every single loop by saying:
Code:
if(rc_dig_in10 == 1) {
 //do this if its ON
} else {
 //do this if its OFF
}
i hope this helps you
but doesn't FIRST supply us with the red LED banner sensors? Do we wire these the same way?
 


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:46.

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