Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   serial communication using c++ (http://www.chiefdelphi.com/forums/showthread.php?t=3529)

Greg McCoy 18-04-2002 15:59

Sounds hard...you will have to replicate the entire OI as a Palm program? Sounds like a lot of work, and how are you going to control the robot? The only inputs you can use will be the stylus & buttons, so it seems like driving would be kind of clumsy.

Good luck, just some things I was wondering about :)

Jnadke 18-04-2002 16:12

Okay... first major setback.

The radio modems and the OI/RC use RS-422 ports. They communicate differently than standard serial RS-232 ports found in your computer. In short, no radio modems unless you figure out a way to work around this problem... I'll research it more... Converters are available to convert it electrically, but it'll cost ya $80.

I don't know if the tether port also uses this method of communication...

Ian W. 18-04-2002 17:35

well, for controlling it with a palm, after i get that done, i'd be able to do more thnigs with it. have to start somewhere. :D also, could you use the O/I as a go through, and just put everything on one port? you have the 4 analog and 4 digital switches. you can run something on that me thinks.

rbayer 18-04-2002 17:54

Quote:

you have the 4 analog and 4 digital switches. you can run something on that me thinks.
True, but how would you get the data to the joystick port? A joystick uses one pin for each axis and each button. On the standard CH joysticks, thats eight pins. Serial only uses one pin for the actual data. Just something to think about.

Not trying to be a pessimist, but I don't see how the tether could be official RS-232 because it can power the OI. Who knows? Maybe I'm just wrong and it actually is. Only time will tell.

Ian W. 18-04-2002 18:10

grr, so many problems. we'll find a way though. :D

Jnadke 18-04-2002 18:10

Quote:

Originally posted by Ian W.
well, for controlling it with a palm, after i get that done, i'd be able to do more thnigs with it. have to start somewhere. :D also, could you use the O/I as a go through, and just put everything on one port? you have the 4 analog and 4 digital switches. you can run something on that me thinks.
Standard serial port is just recieve/transmit. You'll have to write your own module to take control of the serial port at the hardware level in order to use it as some way to communicate over the other pins through the OI...

I thought you meant turning the entire computer into the operator interface... Hrmm... to me it still seems like a waste to have to go through the operator interface... also it makes the project a whole lot easier...

I'm thinking this isn't the project to jump on. It runs so many potential risks/problems. Someone could use something like this for not-so-good tendencies/revenge during a competition.

Ian W. 18-04-2002 18:19

how could someone use this during competition? they would immediately be DQ'd if they start using the laptop. of course, i do see your point. why is everything so hard?

rbayer 19-04-2002 10:27

Has anyone figured out if the tether is RS-232? I don't have access to any RC/OIs this time of year, so I haven't been able to check.

If it is, you could try writing a quick-and-dirty two-way serial port passthrough/capture program. My idea is to hook the OI and RC up to different serial ports on the computer. The program would then capture everything sent between the two, and forward the packets out the other interface. Doing it that way, the RC/OI would think they are still directly connected.

Ian W. 19-04-2002 12:20

well, i can try to find out for you in week. but by then, you'll have figured out too. :D

rbayer 19-04-2002 12:26

Yeah...I'll slap together a program on my way to nationals. Try it out on a real robot.

Ian W. 19-04-2002 12:49

hmm, i guess i'll have to come and raid your pit then. :D seems like an interesting project, wish i knew more about C++ (i've only been doing it one year).

Greg McCoy 19-04-2002 15:43

A more useful project: A full control system emulator. One of these would be handy for testing code out when you don't have the robot handy. Also, a good way to test before downloading to the robot.

If you could make the PWM/Relay outputs so that you could label them (so you know what's going on with the "motors") and visualize their output, while also being able to control the OI, that would be awesome.

Good project for someone with more time and patience then me!

Quote:

Originally posted by Jnadke
Okay... first major setback.

The radio modems and the OI/RC use RS-422 ports. They communicate differently than standard serial RS-232 ports found in your computer. In short, no radio modems unless you figure out a way to work around this problem... I'll research it more... Converters are available to convert it electrically, but it'll cost ya $80.

I don't know if the tether port also uses this method of communication...

I forgot about that. Another very good point. :)

Dave Flowerday 19-04-2002 17:23

The tether port does use RS-232. HOWEVER: don't hook a laptop up to this port as +12v from the robot battery is provided on one of the pins. In theory this shouldn't damage anything since RS-232 has a range of -25v to +25v, but I think it would be extremely unwise to try it.

If you're interested in this kind of thing though you should come check out the Wildstang pit and ask an electrical person to show you the Mini Controller we made. We built a little circuit with a microcontroller on it that speaks directly to the robot controller over the tether port. It has a couple of momentary switches on it to retract the hooks and a push button to perform a robot reset. We use it to unhook from the goal after the end of a match rather than carrying out the whole control system onto the field.

VanWEric 30-04-2002 16:21

help
 
If any one can point me in the direction of a good library to play with the serial port, i WILL eventually get this working. as soon as boring summer sets in, i will have nothing but time on my hands. BTW -- this has a very good potential to violate every rule imaginable, but that isnt my goal. I just want to have the ability to break every rule imaginable and feel smug about it.

Ian W. 30-04-2002 19:15

LOL!!!

Well, if we made something like that, it would make FIRST have to police the control systems/dashboard programs a lot more carefully. it would still be cool to do though, and an emulator for me to test the code without a robot would be godly. :D


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

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