Go to Post week 7: check to see if the pets are still alive, ask significant others to take us back, do 6 weeks worth of make-up homework, and ask my boss for another extension. - Tim Baird [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-01-2003, 01:42
Jferrante Jferrante is offline
Registered User
#0506
 
Join Date: Aug 2002
Location: New York
Posts: 67
Jferrante is an unknown quantity at this point
Send a message via AIM to Jferrante Send a message via Yahoo to Jferrante
Question Change to Initializing Inputs and Outputs

In the section Initialize Inputs & Outputs I have noticed that all the pwm's which are normally set to start at 127 are totally missing for this years default code. Did anyone else notice this? Was the starting value necessary or was that just extra stuff that really wasnt needed?
  #2   Spotlight this post!  
Unread 07-01-2003, 02:00
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
err

I would be too scared to try the program without it. It might work. It might not. I know if your NOT using the new RC you have to initialize them or you might get some unwanted feedback, like a kick.

But yeah, if first could give us a default code when there isn't a working compiler, I think there is a good chance that we still need the initialization and they just forgot it.

Serin should overwrite any variables that are in its call, otherwise set it to an arbitrary ZERO(0 or 127).
__________________
R

Last edited by rwaliany : 07-01-2003 at 20:56.
  #3   Spotlight this post!  
Unread 07-01-2003, 10:25
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
I assume you are referring to the fact that the Serout now only has 14 arguments instead of the old 18? In that case, it will (and always has!) be just fine. If you don't output a variable, the Output uP will just set them to 127.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #4   Spotlight this post!  
Unread 07-01-2003, 11:13
Jferrante Jferrante is offline
Registered User
#0506
 
Join Date: Aug 2002
Location: New York
Posts: 67
Jferrante is an unknown quantity at this point
Send a message via AIM to Jferrante Send a message via Yahoo to Jferrante
Quote:
Originally posted by rbayer
I assume you are referring to the fact that the Serout now only has 14 arguments instead of the old 18? In that case, it will (and always has!) be just fine. If you don't output a variable, the Output uP will just set them to 127.

--Rob
I hadn't even noticed that (I only edited serout for tank drive, other than that I leave those alone).

I was referring to the following lines not present in this years default program:
p1_x = 127 'Port 1, X-axis on Joystick
p2_x = 127 'Port 2, X-axis on Joystick
p3_x = 127 'Port 3, X-axis on Joystick
p4_x = 127 'Port 4, X-axis on Joystick

p1_y = 127 'Port 1, Y-axis on Joystick
p2_y = 127 'Port 2, Y-axis on Joystick
p3_y = 127 'Port 3, Y-axis on Joystick
p4_y = 127 'Port 4, Y-axis on Joystick

p1_wheel = 127 'Port 1, Wheel on Joystick
p2_wheel = 127 'Port 2, Wheel on Joystick
p3_wheel = 127 'Port 3, Wheel on Joystick
p4_wheel = 127 'Port 4, Wheel on Joystick
'p1_aux = 127 'Port 1, Aux Analog
'p2_aux = 127 'Port 2, Aux Analog
'p3_aux = 127 'Port 3, Aux Analog
'p4_aux = 127 'Port 4, Aux Analog


It used to be directly below this:

'---------- 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

now its not there. I was wondering if I needed to add it or if the robot would run fine without it
  #5   Spotlight this post!  
Unread 07-01-2003, 11:36
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Those are actually fairly worthless. Any variables you are inputting get read in at that first Serin, overriding anything you choose to initialize them with. As long as you still have the VAR statements (ie p1_x VAR byte), you'll be just fine.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
Closed Thread


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 20: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