Shop OBEX P1 Docs P2 Docs Learn Events
communicating with a C++ program — Parallax Forums

communicating with a C++ program

eliejeliej Posts: 1
edited 2007-03-08 09:26 in BASIC Stamp
I have the sonar and compass running using basic stamp, but my main program controlling the motors and webcam of my robot is written in C++. Does anyone know of a way to send the sonar and compass values to the C program?

thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-08 00:15
    The easiest way to send data back and forth is with a serial port. The Stamp end would just be SEROUT and SERIN. The other end depends on the particular C/C++ implementation and the operating system.
  • Naphtali MooreNaphtali Moore Posts: 42
    edited 2007-03-08 09:26
    Yeah its hard to find any kinda help on this subject. But I found one guy, Dave Scott, who created a pong sat for JPA. It used a BS2 to track enviornmental variables and then DL them to a PC via serial port.·He sent me the code he used. It looks like you basicly access the serial port by opening it like a file/stream then reading and writting to it. Mind you the properties of serial communications sure seems to complicate things. BUT I have posted his original code here http://www.geocities.com/NRMStudios/ComPortUtility.zip You're gonna have to pick through it all to make sens of it. That's what I'm doing now. I'm trying to make a simple DLL that would give your PC programs similar functions to SERIN(portNum, data)·and SEROUT(portNum, data). There is one fairly robust DLL I have found from http://www.marshallsoft.com/·called WSC.. It has a 60 day free trial and a 105$US price.... not too bad. Well good luck!
Sign In or Register to comment.