go_away

Author Topic: sample code to convert Axon into USB to serial adapter  (Read 2585 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,665
  • Helpful? 169
    • Society of Robots
sample code to convert Axon into USB to serial adapter
« on: September 29, 2009, 11: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: [Select]
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
}

 


Get Your Ad Here

data_list