|
|
|
|
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
November 20, 2009, 10:03:26 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Sept 30th - The
5th SoR Robot contest
is now open! Win an Axon II!
Robot Forum
72,667
Posts in
9,267
Topics by
5,292
Members
Latest Member:
lepomis
Robot Forum
>
Software
>
Software
>
sample code to convert Axon into USB to serial adapter
0 Members and 1 Guest are viewing this topic.
Pages:
[
1
]
Author
Topic: sample code to convert Axon into USB to serial adapter (Read 157 times)
Admin
Administrator
Supreme Robot
Helpful? 62
Online
Posts: 8,610
sample code to convert Axon into USB to serial adapter
«
on:
September 29, 2009, 10:35:08 AM »
If you don't own a USB to serial adapter and you need one, just program this into your Axon.
Throw it into control.h somewhere. Make sure you defined baud rates correctly!
Code:
int tempbyte;
while(1)
{
tempbyte=uart0GetByte();//get a single character
if (tempbyte!=-1)//if data recieved
uart1SendByte(tempbyte);//send a byte
tempbyte=uart1GetByte();//get a single character
if (tempbyte!=-1)//if data recieved
uart0SendByte(tempbyte);//send a byte
}
Logged
subscribe to SoR's YouTube account
Pages:
[
1
]
Jump to:
Please select a destination:
-----------------------------
General Misc
-----------------------------
=> Misc
=> Robot Videos
-----------------------------
Software
-----------------------------
=> Software
-----------------------------
Electronics
-----------------------------
=> Electronics
-----------------------------
Mechanics and Construction
-----------------------------
=> Mechanics and Construction
Related Topics
Subject
Started by
Replies
Views
Last post
have C++ serial code?
Software
benji
12
1762
December 11, 2007, 05:42:00 AM
by
reSpawn
Serial Uart Passthru code
Software
Asellith
3
879
January 04, 2008, 05:54:05 AM
by
GUmeR
cheap bluetooth serial adapter
Misc
Trumpkin
5
1178
December 19, 2007, 07:40:56 AM
by
Trumpkin
SSC-32 with Prolific USB to Serial Adapter
Electronics
SeagullOne
0
73
October 26, 2009, 02:54:57 PM
by
SeagullOne
Advertise on this Forum
Loading...