Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   May I get a steering wheel and pedal code check? (http://www.chiefdelphi.com/forums/showthread.php?t=63780)

windell747 11-02-2008 08:37

May I get a steering wheel and pedal code check?
 
2 Attachment(s)
Hi guys, With it coming down to the wire, I am writing a lot of code away from the bot to make the most use of testing during the time im with the bot. I'm sure that a lot of us programmers are doing the same. I just wrote some code that will take input from our steering wheel and pedal and generate the PWM values.

Unlike, the mixed x and y joystick code, I've modified the code so that the bot will not move untill the pedal is pressed. My thought was to make the code act like driving a car--turning the steering wheel does nothing until the pedal is pressed.

I won't see the bot until later today so I would like to bounce my code off of some of you programmers before I load it on the bot. Feel free to let me know of any problems that you may see! By all means, you can copy my code if you can find use of it for your team!

I don't know how to post code directly, so I've attached it as files. In addition to my code, as some of you may notice, I've followed the code modifications suggested by team 1540.

Here is where to look at:
-Custom_Remote_Control function in custom_routines.c
-the "Custom_Remote_Control" function is called from Master_Data_From_uP function in user_routines.c.
-Macro substitutions at the top of custom_routines.c

Thanks!
Windell
#2477

MrForbes 11-02-2008 08:43

Re: May I get a steering wheel and pedal code check?
 
I can't comment on the code (sorry!) but I'll comment on the driving concept...we are using a small R/C type control, with a tiny 2" steering wheel and trigger type throttle, and a 6wd skid steer chassis. The programming team decided it works well if the steering wheel turns the robot even if the throttle is not touched--it will spin the robot in place when you turn the steering wheel, and the speed it spins will be proportional to how far you steer the wheel. This gives the driver one more way to move the robot, which you lose if you require the throttle to be activated (adding forward motion to your steering).

You might want to think about this, as it could affect your plans. One big advantage of skid steering is that it does let you turn "on a dime".

If you are using Ackermann type steering instead of skid steer, then this would not apply.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi