C++ program for USB to Serial Converter to XBEE

Programmer, In-Circuit Debugger, PIC Start-Up Kit, Memory Interface...

C++ program for USB to Serial Converter to XBEE

Postby Ahmad Loqman » Tue May 03, 2011 4:46 pm

I had build a simple mobile robot control by wireless device using XBee. I am able to control the robot by sending (and receive) USART data to XBEE using microC or X-CTU terminal. The connection from computer to XBee using USB to Serial converter I buy from Cytron. The XBee is interfaced to serial by MAX232. The data is in simple 8 bit form, either send or receive.

Now I want to control the robot from the computer using a better program. I tried a Visual C++ program to send data to Serial port com. Here is the problem. The program could not open the virtual com. I tried a C++ program for serial library from 'codeproject.com'. The error is:
Unable to open COM-port
(error code 2)

I use visual C++ 2008 Express Edition. Can someone give hint as to what could be wrong. Or suggest a working library for the virtual com port. Or should I use some other programming base like VB.
Ahmad Loqman
Fledgling
 
Posts: 1
Joined: Tue May 03, 2011 2:18 pm

Re: C++ program for USB to Serial Converter to XBEE

Postby yonghui » Wed May 04, 2011 8:33 pm

hi,

there is a sample program for sending api commands to xbee module using SKxbee,
but the program is written in C#. u try to download and refer. from robot head to toe magazine website:

http://www.robothead2toe.com.my/

i cant remember which volume d. its from series of getting start with IFC, IFC-Xbee



regards,
yh
thanks&regards,
yh
yonghui
Moderator
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm


Return to PIC Development Tool

Who is online

Users browsing this forum: No registered users and 13 guests