Go to Post It's just a game. - artdutra04 [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-06-2002, 00:16
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
pBasic

Posted by Robert Hennessy at 2/4/2001 10:59 PM EST


Student on team #254, Cheesy Poofs, from Bellarmine College Preparatory.



I am having great difficulty trying to understand the shiftin and shiftout functions. What is the cpin exactly? Is it user-defined or is there a specific pin that it must be defined as? Does it have to connect to a specific part of a sensor? Also, how do you access the robot interface internal clock? Thank you for any help in advance.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #2   Spotlight this post!  
Unread 24-06-2002, 00:16
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
hey...

Posted by EJ at 2/5/2001 2:09 AM EST


Student on team #254, Cheesy Poofs, from Bellarmine.


In Reply to: pBasic
Posted by Robert Hennessy on 2/4/2001 10:59 PM EST:



when did u start helpin out w/ the programmin? that's Jay's job...has he been slackin of...??
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #3   Spotlight this post!  
Unread 24-06-2002, 00:16
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: pBasic

Posted by Lloyd Burns at 2/5/2001 2:16 AM EST


Other on team #188, Woburn Robotics, from Woburn Collegiate and Canada 3000, ScotiaBank, Royal Bank Financial.


In Reply to: pBasic
Posted by Robert Hennessy on 2/4/2001 10:59 PM EST:



: I am having great difficulty trying to understand the shiftin and shiftout functions. What is the cpin exactly? Is it user-defined or is there a specific pin that it must be defined as? Does it have to connect to a specific part of a sensor? Also, how do you access the robot interface internal clock? Thank you for any help in advance.

. SHIFTOUT/IN is not needed in the RC, as without tampering, you cannot access the pins on the pBasic interpreter. For other purposes, yes, you must designate a pin as cpin (as is done for fpin with the RC's SEROUT/IN commands).
. To access sensor number # (# = 1 to 7), change the value of the c_sensor# CON in the list from 0 to 1, and in the SERIN statement, in the appropriate place in the variables list, have a variable ready to receive the value.

. If you need timing, check the rate that the "basic run" LED on the RC is flashing: it should take about 80 ms to blink on then off, or, it should come on 125 times in 10 s. If this is the case with your final program, then each loop through your program takes 40 ms, since the LED is toggled (turns on if off, off if on) once per loop.
. The minimum loop time is determined by the OI, which sends a new package of data no more quickly than once every 40 ms. (The way to extend it is to write a complicated loop.) Every packet has a packet number (accessed as with sensor#, as explained above, by reading it), so if you note the packet number when you turn something on, and wait until the packet number is the same again, you will have to wait 256 * 40 = 10 240 ms or 10 and a quarter seconds. You can also subtract the old value from the new one to tell how many periods of 40 ms you have waited (if less than 10.24 s).
. The variable delta_t tells how long your loop is taking, but since the communications are generally good and the loop time in a particular program won't change unpredictably, forget delta_t, time your loop, and write the final program with that time value in mind.

Hope this helps



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #4   Spotlight this post!  
Unread 24-06-2002, 00:16
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
bad data changes loop time

Posted by Joe Johnson at 2/5/2001 5:58 AM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: Re: pBasic
Posted by Lloyd Burns on 2/5/2001 2:16 AM EST:



The loop time can jump around quite a lot if you have a noisy radio condition or if another radio is stomping on you radio signals (for instance in the pits on channel 40).

I recommend that you use delta_t or packet_num to keep track of time rather than simply counting loops.

Joe J.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC ARCTAN function Greg Ross Programming 14 11-05-2003 12:28
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
RoboEmu 1.09 (supports PBASIC 2.5) rbayer Programming 22 21-01-2003 17:22
PBASIC Loop Speed? archiver 2001 3 23-06-2002 23:46


All times are GMT -5. The time now is 07:14.

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