Go to Post Dont give up, because that is when you lose what you have. FIRST is the best experience that I have had throughout my entire life and there is no way ANYONE can make me quit FIRST. - Arefin Bari [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
  #1   Spotlight this post!  
Unread 26-01-2002, 13:43
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
Rookie Programmer has question about the default code

Hey guys, I'm taking a look at the code, and I've got a small question. On this part:
Code:
'========== MAIN PROGRAM =====================================================
'=============================================================================

'---------- Input & Output Declarations --------------------------------------

Output	COMB
Input		COMA
Input		COMC

Output	7	'define Basic Run LED on RC => out7

Output      8	'define Robot Feedback LED => out8	=> PWM1 Green
Output      9	'define Robot Feedback LED => out9	=> PWM1 Red
Output      10	'define Robot Feedback LED => out10	=> PWM2 Green
Output      11	'define Robot Feedback LED => out11 => PWM2 Red
Output      12	'define Robot Feedback LED => out12 => Relay1 Red
Output      13	'define Robot Feedback LED => out13 => Relay1 Green
Output      14	'define Robot Feedback LED => out14 => Relay2 Red
Output      15	'define Robot Feedback LED => out15 => Relay2 Green


'---------- Initialize Inputs & Outputs --------------------------------------

Out7  = 1		'Basic Run LED on RC
Out8  = 0		'PWM1 LED - Green
Out9  = 0		'PWM1 LED - Red
Out10 = 0		'PWM2 LED - Green
Out11 = 0		'PWM2 LED - Red
Out12 = 0		'Relay1 LED - Red
Out13 = 0		'Relay1 LED - Green
Out14 = 0		'Relay2 LED - Red
Out15 = 0		'Relay2 LED - Green
I know this part controls the LEDs, but I've got two questions. First of all, what does "Output" do? Meaning, what does it mean when the code says, "Output 7". And my second question, whats the relationship between "Output 7" and "Out7 = 1"? I take it 1 means the LED goes on and 0 means the LED is off, but how does it know that "Out7" sends to the "Basic Run LED"?
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How long does it take you to load the default code? vegasmcse Robotics Education and Curriculum 10 03-11-2003 21:41
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
Default Robot Code lvhsrobotics Programming 2 10-01-2003 16:55
2003 PBasic default code from Innovation First ttedrow Programming 0 06-01-2003 11:18
default code archiver 2001 2 23-06-2002 22:53


All times are GMT -5. The time now is 23: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