Canada
Asked — Edited
Resolved Resolved by DJ Sures!

Sendserial - Carriage Return?

I'm still fighting with a serial module.

Noticed on the setup commands notes - >

"All commands consist of a channel number, followed by a comma, the command and a newline (Enter key)"

Does the sendserial command already do this? or do I need to add something in for a new line/carriage return?

Command I'm trying to send is:

SendSerial(D3, 9600, "1,start") Also trying variations SendSerial(D3, 9600, 1,"start")

It's been 3 weeks and I still can't get this module to work. stress


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

PRO
Synthiam
#1  

First visit: http://www.asciitable.com/

A carriage return is the decimal ASCII value 13 (hex 0x0d) A line feed is the decimal ASCII value 10 (hex 0x0a)

So if you just want a CR, then send a value of 13

If you need a CRLF then send a 13 and 10


sendSerial(d0, 9600, "hello", 13, 10)

Canada
#2  

Thanks DJ,

I'll give that a whirl.

Canada
#3  

Finally!

Other than a few minor quirks I got the KangarooX2 module working.

3 weeks of frustration.

I can now control big R2's dome with precision via serial commands.

Thanks DJ!

United Kingdom
#5  

I found something similar was needed for the TellyMates too, luckily batsocks were clear on how to send escape and cr etc. But the ASCII chart is something worth keeping if you plan to use serial commands.

glad you finally got it sorted:)