Go to Post The kick-off is your opportunity to finally open the REALLY BIG box that has been sitting under the tree. - dlavery [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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
  #4   Spotlight this post!  
Unread 24-11-2003, 09:34
Sachiel7's Avatar
Sachiel7 Sachiel7 is offline
<Yes I managed to flip it
AKA: Shayne Helms
FRC #1132 (RAPTAR Robotics)
 
Join Date: Sep 2002
Rookie Year: 2002
Location: Richmond, VA
Posts: 541
Sachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really nice
Send a message via AIM to Sachiel7
Sounds cool.

Quote:
BTW - If you right-click on the joystick it recenters both axis.
Heh, I just figured that out last night. Helps alot!
I have a few questions though:
What did you use to program this?
I'm trying to understand the communications a bit more. I don't have very much experience in serial or COM communications at all. From what I understand, the PC puts together a data packet of all 4 joysticks. This is 8 bytes in length. I'm assuming it's 2 bytes per joystick, 1 byte per axis. When Its got a new packet ready, it sends out a signal to the RC. When the RC is ready to receive, it sends a signal back. The RC receives the packet, then sends out its 10 byte, 2 integer packet back.
But I'm having trouble with the inner workings of this routine. I browsed through the pc_interface.c file included in the packet, and found the Wait4TXEmpty function call. I noticed that when I tried to compile the project, I couldn't, because the alias.h was referred to as IFI_aliases.h and the IFI_default.h (i think) was missing something. I'm guessing you updated the default code with that function.
Anyway, I'm guessing that it means wait until the PC has pulled this value.
So, when I load up my program (the one I wrote for the joysticks ) and it starts transmitting data, the RC gets stuck in an infinite loop. Now, my PC recognizes if the RC goes offline, so I know it's seeing it right. I just don't think I'm handling everything correctly. Could you give a C code example (even though I'm using Qbasic ...for now...) of how the data's put together and sent/received. Anyway, I have got the joystick input working aok. I've got one flight stick hooked up, and I can pull all the axis, wheel, and buttons from it. The program I have currently calibrates the joystick at startup, then filers the values every cycle, so they range from 0-254, and the axis are lined up correctly. So far so good. I just need an idea of what to do after that. After 1 PC cycle, the next packet is ready. So, I'm supposed to send a small byte to the RC, right? Or do I pull a value?
That's where most of my confusion sets in.
Oh, and another quick question:
What's the setup of the COM connection?
9600baud, no parity, 7 databits, 1 stopbit ?
That also may be where I'm off. Anyway, thank's for the help.
__________________
-=Sachiel7=-

There's no such thing as being too simple!
Look for Team #1132, RAPTAR Robotics at the VCU Regional this year!
Reply With Quote
 


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
How much planning goes into your robot? Jnadke General Forum 41 29-01-2006 21:29
White Paper Discuss: Using an Operator Interface with the 2004 EDU RC CD47-Bot Extra Discussion 6 20-01-2004 21:11
Some code in C that we may need if we are in trouble Andrew Rudolph Chit-Chat 16 07-10-2003 21:34
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 19-03-2003 13:30
Controlling a FIRST robot with a Lego RCX Controller? archiver 2001 5 24-06-2002 04:19


All times are GMT -5. The time now is 12:32.

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