Canada
Asked — Edited
Resolved Resolved by Rich!

Sendserial Format

Hey all,

I'm trying to get my Dimension Engineering KangarooX2 module to work with my Syren10.

I can link/tune via the USB connection. It allows me to move and control the Syren10 no problem.

I'm having troubles sending and getting the SendSerial command to work with my EZ-B.

The the module is setup to communicate 9600/8N1 and plugged into my D3 port on my EZ-B.

The command for the module is

1,p2450 s200

I've tried the following:

SendSerial(D3, 9600, 1,p2450 s200) SendSerial(D3, 9600, '1,p2450 s200') SendSerial(D3, 9600, "1,p2450 s200")

None have worked so far. Not sure if I'm just messing up the string format or what?

Anyone?


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

United Kingdom
#1  

Try

SendSerial(D3, 9600, 1, "p", "2450", "s", "200") SendSerial(D3, 9600, 1, "p", 2450, "s", 200) SendSerial(D3, 9600, 1, 0x70, 2450, 0x73, 200)

United Kingdom
#3  

We don't know if it worked yet;) But I've been playing with SendSerial a lot lately with the TellyMate which had similar style commands so fingers crossed.

Canada
#4  

I'll give it a whirl when I get home tonight.

Thanks Rich!

Kris

Canada
#5  

Still tinkering. I think it has something to do with the comm speed.

Pulling it all out to tinker with it on the workbench.

#6  

I've rewired my B9 leg section to be controlled with a Kangaroo X2/Sabertooth 2x12 combo. I've heard a lot of good things about this set of boards being able to control rotation like a servo.

I'm having some trouble getting this combo to work using SendSerial from EZB and ARC. I read in a different thread that Lumpy got this to work in his R2D2. Here the thread at post #8: Link . I haven't yet tried to link/tune via the USB connection like Lumpy did because I don't yet have an adapter. I do know it will move the DC motor because I've been able to have the Kangaroo auto tune. It moved the motor through the steps to find the limit switches, pot feedback and speed of the system. All worked great and I thought I would breeze through this. However when I try to send a command from ARC through SendSerial nothing happens. In the other thread I pointed to above, Lumpy found an added command and got his dome to work. No go with my setup. Here's the syntax from his thread we both used and his explanation:


Dome Center - SendSerial(D0, 9600, "1,p2450 s800", 0x0d, 0x0a)
Dome Left - SendSerial(D0, 9600, "1,p3675 s800", 0x0d, 0x0a)
Dome Right - SendSerial(D0, 9600, "1,p1225 s800", 0x0d, 0x0a)

D0=EZ Robot Port
9600=Baud
1=Motor Channel
Pxxxx=Position
sxxx=Speed
0x0d=Return Key *
0x0a=New Line*

*These two items are what caused me grief for about a week. Once
I added them to the command line everything began to work.

I did make sure I changed my entry so it pointed to the port my cable was attached to. Any ideas? Hopefully Lumpy will read this and chime in if he can help. Here's the statement I used. This should send it almost to the end of stroke and the limit switch:

SendSerial(D14, 9600, "1,p1200 s800", 0x0d, 0x0a)

One odd thing; I do notice that the steady blue light on the EZB blinks off and on quickly when the SendSerial command is sent. Also the signal pin on the port I'm using stays high (5vdc) after the command is sent. Is this normal?

Thanks in advance, Dave Schulpius

#7  

@Dave Just a couple of thoughts.....does the blue light blink fast when any other commands are sent? Has the Bluetooth become a "bottle neck" for serial data! Have you tried a dead slow " s100" command to see if that has an effect? Also does the rapid blinking occur if the Kangaroo is plugged in? ,, to see if there is a poor relationship with that board. Can you use another serial peripheral to compare a serial command?

Trouble shooting is a big part of what we love to do ;)

#8  

Hey Glen! Thanks for the interest and help. This is the first time I've tried to use the SendSerial feature so I'm kinda a newbie in this area.

The blue light only winks once quickly at each and every SendSerial sentence sent. I haven't tried it with any other control or command. Like I stated earlier; The signal pin of the port I'm using stays high after a SendSerial command is sent and connected to the Kangaroo. Not sure what happens with it's disconnected. I'll try that today.

I haven't tried running the Sabertooth yet without the Kangaroo. I actually planed to try this today. I also have an extra Sabertooth, Kangaroo and EZB so I plan on setting up all new hardware to see if I may have a faulty board somewhere. I have a feeling it's either the way I have everything wired or my Syntax. However both seem correct to me.

As far a Syntax; the only thing I'm unsure of is why Lumpy added both a 0x0d (Carriage Return) and a 0x0a (New Line) in his statement. The Kangaroo manual says a "New Line" statement is needed. The documentation of how to use the Kangaroo and Sabertooth sucks and I cant find a forum that is talking about them much. When I do find a thread it's either about people waiting on one to arrive or saying that it works great for them. Not much about how they set it up.

I'm not sure but I don't think there could be a bottleneck for the Bluetooth. I'm testing this in a new occurrence of ARC with only this one EZ Script control installed and it's connected to just this one EZB board.

Using another Serial device is a good idea but I'm not sure what I could use. Again, I'm new to this part of it all and feel a little lost. Any suggestions on what other kind of serial peripherals are out there I could easily use and find? I do have a USB to Serial adapter on the way from Amazon that should be here Tuesday. I hope to be able to use my laptop and use a Terminal to send commands. This way I can see Kangaroo's feedback error codes if I'm doing something wrong. One of the cool things about Kangaroo & Sabertooth is that they return a lot of feedback info with blinking lights and serial error codes (if you have the RX (return) line hooked up).

Thanks again, Dave