View unanswered posts | View active topics It is currently Sat Dec 20, 2014 1:54 am






Reply to topic  [ 2 posts ] 
Question about the 'sendChar' command 
Author Message
Rookie

Joined: Thu Jan 30, 2014 9:28 am
Posts: 8
Post Question about the 'sendChar' command
Is there a way to send a complete string through the UART port at once or are you only able to send a single character at a time? I wanted to send a configuration command to a GPS receiver.


Thu Feb 13, 2014 9:43 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Question about the 'sendChar' command
Code:
while (still some chars left):
  aChar = nextCharOnList();
  sendChar(aChar);
}

Easy peasy :) It's actually pretty fast that way, just a bit more work on your part. I've done similar things for the RS485 port on the NXT where you can also only send single chars down the line.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Feb 15, 2014 1:08 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.