Network Change icon Network Change — Execute scripts on WiFi/network connect or disconnect; monitor adapter, store status in a variable and trigger custom scripts for headless SBC robots. Try it →
Canada
Asked — Edited
Resolved Resolved by DJ Sures!
2 Participants

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

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#1  

First visit: https://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)
Author Avatar
Canada
#2  

Thanks DJ,

I'll give that a whirl.

Author Avatar
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!

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#4  

:D anytime dude!

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#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:)