Go to Post I have a bobble head? - Koko Ed [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 22-03-2004, 01:31
CharlieWilken CharlieWilken is offline
Registered User
#0634 (Robowolves)
 
Join Date: Jan 2002
Location: Van Nuys, CA
Posts: 46
CharlieWilken is an unknown quantity at this point
counting digital input

How do I count digital input ticks?

Im trying to get our autonomous mode to work before our regional this Thursday. Im using the banner optical switches to count ticks on my wheel that I painted on with reflective paint. We have tank style right and left side steering. I estimate I want to move 43 ticks forwared and turn say right with 4 ticks on one side and 1 tick on the other. I then want to move both sides forward 3 ticks. I figure from read chief delphi I can do this using 3 "states" Forward_long, turn and forward_short. However I dont know much C just enough to cut and paste or substitute.

1, How do I make a counter that keeps track of the number of ticks the digital input gets.
2. Where do I put the code for the timer? Where do I put the code for the states?

thanks in advance!
 


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
digital inputs not valid just after initialization? WizardOfAz Programming 2 26-01-2004 13:21
Some EDURobotics Problems squide Robotics Education and Curriculum 9 20-01-2004 10:27
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
How do u hook up the digital input to the sensor's wires Fares Technical Discussion 2 14-02-2003 16:41
Robot Digital Input Mike Norton Technical Discussion 5 16-01-2003 14:31


All times are GMT -5. The time now is 17:06.

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