|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
serial communication using c++
Vanweric and I are thinking about doing some things with C++ and serial communication so we can control the robot with a laptop outside competition. Anyone know anything about this?
Thanks for the Help. ALSO: Im new here, im on team 250 with vanweric, ill be around here more often from now on, so now you know who i am ![]() |
|
#2
|
||||
|
||||
|
First of all, welcome. Can i say that, i've only been here a few monthes. bah, i'll say it anyways.
![]() Any way, if you can figure out how to do something with the serial port and C++, i'd love to help, cause i'm learning C++ this year, and so far, i actually got really far. i'm always trying to learn more, and what better way than learning how to play with the actual hardware? i actually have a family friend that programs palm pilots, and when you make a palm pilot program, you use either C or C++ to create a program to "Hot Sync" the palm pilot and the computer, to download the program to the palm. if you want, i can ask him, cause to go from C to C++ won't be that hard (i hope ).another thing we could possibly do, is create a simluator, which will let a laptop or something else emulate the robot controller and operator interface. i'm not sure how either works, beyond the PBASIC code used to program them. i know that many people, including myself, would like to create a simluator, which would make our lives much easier. so, i'll try to find out about the serial port, and if i can get anything, i'll post it up. although, i can't say if i'll get anything in C++, cause my friend is a C kinda guy. ![]() somethnig i just found, although i don't quite understand. you can get it here... http://www.myspace.d2g.com/first/CD_stuff/serial_1.zip no, i didn't make it, and i don't quite understand it all. the basic stuff makes sense to me, but don't ask me to explain it to you, cause you'll wind up more confused than i am. ![]() Last edited by Ian W. : 08-04-2002 at 15:14. |
|
#3
|
|||
|
|||
|
Thanks,
Are you going to Florida for Nationals? If so we should meet there. Also, ask that friend who programs Palms if he knows anything... post back if you find out anything |
|
#4
|
||||
|
||||
|
well, didn't get a chance to email my friend, i'll try today. have to ask my dad for his email address
. and yes, i will be at florida. team 810, Mechanical Bulls. the serial class up in my other post doesn't seem to work when i try it, but if anyone else can make it work, try it. we may need to resort to assembly language to make it work, and i don't know that. |
|
#5
|
|||
|
|||
|
these look good, im still trying to figure out how to use them though, someone wanna give it a shot?
http://www.marshallsoft.com/wsc4c.htm |
|
#6
|
||||
|
||||
|
Are we talking about Visual C++ or Borland C++? Or something else?
|
|
#7
|
||||
|
||||
|
well, i'm talking VC++, cause that's what i know. i wasn't aware of a difference between the two, although if there is, i only know VC++.
|
|
#8
|
|||
|
|||
|
C++ is C++ #include "geek.h"
C++ is C++ regardless of what compiliar you use. The only thing I know Microsoft did in their program that kinda effects the language is they automatically include the boolean header file in all programs. The program I use, Symantec C++ however does not, I need to do a little #include "bool.h" everytime I need to use it.
|
|
#9
|
||||
|
||||
|
I was thinking that VC++ used different methods to access drivers (like your serial port driver) so that the programs could work through Windows more efficiently. Maybe not...
|
|
#10
|
||||
|
||||
|
Unless you can find out how the data is transmitted and processed inside the robot controller, you are SOL... Those team numbers are on there for a reason... it actually sends them...
You could probabaly hook the laptop up to the operator interface and use that as a controller... but as for the laptop emulating the operator interface, that would take some time... Hmmmmm... sounds like a good project. You have me interested now... |
|
#11
|
||||
|
||||
|
well, i've been busy doing lots of C++ work in school. we had to make our own class, that emulated an ATM machine, saved account info, and then transactions. made myself a cool little program, actually had to look somethings up myself, cause i' gettnig too advanced for my teacher.
![]() anyways, i haven't had much time to look at the serial port classes. can anyoen who's been doing C++ for a while try looking for some that work? maybe even explain how they work after too? ![]() |
|
#12
|
||||||
|
||||||
|
If you have the MSDN Library (it comes with VC++) do a search for "Serial Communications in Win32". It should return a rather lengthy technical article that describes everything you need to do. While it is just plain-'ol C instead of C++, it should work for you.
If you don't have the Library, I can try to find another place with the same info. |
|
#13
|
||||
|
||||
|
i think i have the library, but i didn't install it. maybe i will now.
![]() |
|
#14
|
||||
|
||||
|
YAY! MY dad's friend, who is a palm programmer, said he'd help me to control the robot through a palm.
if i can figure that out, a laptop can't be that much harder. i'll get back to you with an results. |
|
#15
|
||||
|
||||
|
Fine, you guys got me curious... I'm going to turn this into a personal project...
A project like this could take a while. Innovation FIRST provides no information about the operation of the devices, so you're going to have to reverse-engineer it.. Hey... I may be able to even turn it into my presentation for my Assembly class. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to communicate both through radio and serial port? | JC Denton | Programming | 1 | 08-02-2003 23:43 |
| Problem with communicating with STAMP through serial port | Skabana159 | Technical Discussion | 2 | 06-02-2003 21:10 |
| Ever seen this serial port problem before??? | Aidan F. Browne | Programming | 5 | 05-02-2003 12:03 |
| organized way of communication with FIRST? | archiver | 2001 | 0 | 24-06-2002 04:20 |
| Serial Port Communication White Paper | rbayer | Programming | 87 | 14-06-2002 16:10 |