Go to Post When I invite a woman to dinner, I expect her to look at my face. That's the price she has to pay. - 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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-03-2004, 18:43
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: counting in seconds for the autonomous mode??

Quote:
Originally Posted by Pattyta
hi there,,,

does any one knows how to convert the cycles of the autonomous mode 26.2ms to like actual seconds to keep a counter in seconds???


Thnx
Rockie team
help plz competition in 2 days
Time can be measured in seconds, or minutes, or hours, or microseconds. Why do you need to work in units of seconds? That conversion requires floating point arithmetic, and that means a lot of CPU time is used up. But how about using a new unit for time? Call it "ticks". The conversion factor for seconds to ticks is

ticks = seconds * (10e6 / 2e18 );

The autonomous period lasts 572 ticks. The entire match is 4578 ticks.

You can keep track of ticks using integers and integer math, and avoid all that floating point stuff that takes up memory and CPU time.

BTW, I programmed my auton to take a swipe at the trigger ball starting at 534 ticks (38 ticks before the end of auton). It knocked off the ball, but the blue balls were not released. They claimed it was too late. It was our last match and the first time everything came together for IR tracking (i.e. we didn't get rammed) Hmmm.... At nationals I'm gonna back that down to 80 ticks before the end of auton.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #2   Spotlight this post!  
Unread 30-03-2004, 22:23
Pattyta Pattyta is offline
Registered User
#1300
 
Join Date: Mar 2004
Location: oakville,canada
Posts: 8
Pattyta is on a distinguished road
Re: counting in seconds for the autonomous mode??

when should we stop the robot, using a counter by following the line ????

is there any way of figuring that out/??? or is the only way just trying it on the robot and hoping it works ???
  #3   Spotlight this post!  
Unread 30-03-2004, 23:26
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: counting in seconds for the autonomous mode??

Quote:
Originally Posted by Pattyta
when should we stop the robot, using a counter by following the line ????

is there any way of figuring that out/??? or is the only way just trying it on the robot and hoping it works ???
Here's a very similar thread that may help you.



-norm
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #4   Spotlight this post!  
Unread 30-03-2004, 23:29
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: counting in seconds for the autonomous mode??

Quote:
Originally Posted by Pattyta
when should we stop the robot, using a counter by following the line ????

is there any way of figuring that out/??? or is the only way just trying it on the robot and hoping it works ???
I tried to help you all I could. Now I'm at a loss trying to understand you. Please use complete sentances and proper punctuation. I spent about 10 minutes preparing an answer, please spend more than 1 minute answering.
  #5   Spotlight this post!  
Unread 31-03-2004, 00:16
Pattyta Pattyta is offline
Registered User
#1300
 
Join Date: Mar 2004
Location: oakville,canada
Posts: 8
Pattyta is on a distinguished road
Re: counting in seconds for the autonomous mode??

Sorry for that.. Thanks for your help. its just that i am really stressed about this and i feel i can't handle it anymore

ok here i go again

i think i have the code working for the line following with two sensors.

is there any way of knowing when to stop other than just timing it with like a stopwatch? to avoid the robot to hit the wall and be stuck to it ?
  #6   Spotlight this post!  
Unread 31-03-2004, 00:25
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: counting in seconds for the autonomous mode??

Quote:
Originally Posted by Pattyta
Sorry for that.. Thanks for your help. its just that i am really stressed about this and i feel i can't handle it anymore

ok here i go again

i think i have the code working for the line following with two sensors.

is there any way of knowing when to stop other than just timing it with like a stopwatch? to avoid the robot to hit the wall and be stuck to it ?
There's 2 ways you can detect the end of travel:

1. Your time and stop watch idea.
2. You could install a microswitch (digital switch) and a bumper to the front of your robot. If you were following the line, and the bumper sensing switch was closed, you would know you hit the wall.
  #7   Spotlight this post!  
Unread 31-03-2004, 00:41
Pattyta Pattyta is offline
Registered User
#1300
 
Join Date: Mar 2004
Location: oakville,canada
Posts: 8
Pattyta is on a distinguished road
Re: counting in seconds for the autonomous mode??

the competition is this thursday so i think we'll have to do the stopwatch measure.

thnx people
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
Simple Autonomous Mode Example deltacoder1020 Programming 5 08-03-2004 20:22
Initializing autonomous mode Mr. Lim Programming 7 02-02-2004 07:26
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
autonomous mode timer Don Programming 6 09-02-2003 22:16


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