Go to Post If that many teams could do it successfully every match this year I will eat my robot. - Jay O'Donnell [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
  #2   Spotlight this post!  
Unread 14-01-2008, 19:25
jratcliff jratcliff is offline
Registered User
no team
 
Join Date: Jan 2008
Location: Lake Saint Louis, Missouri, USA
Posts: 10
jratcliff will become famous soon enoughjratcliff will become famous soon enough
Re: Getting constant motor power with IR board

Quote:
Originally Posted by Nightfall831 View Post
today i put the ir board on our robot after some preliminary testing and I have managed to get the robot to respond to the IR signals sent to the IR board.

however, the motors only run for as long as the IR board recieves a signal (less than a second)

our current code looks something like
Code:
if (rc_dig_in01)
     {
          pwm03 = pwm04 = 1;
          pwm07 = pwm08 = 255;
     }


i am not surprised at the result i am getting, but all attempts to create constant motion have failed. the only way i can think of is to have the remote cause a variable to be "true" and so that

Code:
while (variable = true)
     {
          pwm03 = pwm04 = 1;
          pwm07 = pwm08 = 255;
     }
or something to that effect

any suggestions?
You are on the right track. You should start developing routines that do things like 'go forward' and 'go left'. Next, when you get an IR signal you will set a variable that says which routines to run 'forward', 'left', 'stop' , etc. You will probably not be able to control the robot in real-time with the IR inputs.

Instead think if it as sending 'commands' that you will execute until told otherwise. There is going to be a lot of IR scatter and interference so don't expect to get a low latency response from the controller.

John
 


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
Issues with non working victor constant orange led dani190 Control System 10 21-12-2007 22:32
Denso window motor, getting spares caffel Motors 4 09-02-2006 11:47
cim motor power question Zippiot Motors 16 16-02-2005 20:40
Getting the relays to stay constant Lord Nerdlinger Programming 2 19-02-2004 10:17
power of globe motor with gear box? Ken Leung Motors 5 21-11-2001 13:43


All times are GMT -5. The time now is 18:22.

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