Due not sending to motorcontroller

I just finished a working project with a funduino (nano). In this code I use the USBSabertooth library, and everything works. When attaching my Due to the motorcontroller it won't send any signals.
Even the smallest things won't work:

#include <USBSabertooth.h>
USBSabertoothSerial C;
USBSabertooth ST(C, 128);
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
ST.motor(1,0);
ST.motor(2,0);
digitalWrite(13, LOW);
delay(1000);
ST.motor(1,1000);
ST.motor(2,1000);
digitalWrite(13, HIGH);
delay(1000);
}

This doesn't send anything, while the funduino does. I don't have a clue where to start looking, but it's pretty frustrating that a real Arduino is being more difficult than a fake one.
I'm using a Sabertooth 2x32 motorcontroller. Tried all the different TX pins on the Due.
Any advice is greatly appreciated.

Your problem is probably the voltage level. Use buffers to raise the level to 5V.

Isaac96:
Your problem is probably the voltage level. Use buffers to raise the level to 5V.

Could you link me how to do this? I am pretty new to Arduino. Had the exact same problem with the Arduino Yùn though.

Wait-your code doesn't work with the Yun? If so, buffers won't help. Could you attach pictures and the USBSabertooth library?

Isaac96:
Wait-your code doesn't work with the Yun? If so, buffers won't help. Could you attach pictures and the USBSabertooth library?

Code doesn't work with the Yùn because apparently the TX and RX pins are used for Linux (I was told so on this forum). That's why I tried it out with the Due in the hope that this would change. The setup is fairly simple, I've made a simplistic scheme as I don't have the gear with me right now.:

Imgur

The USBSabertooth library I'm using can be found here:

https://www.dimensionengineering.com/software/USBSabertoothArduinoLibrary/html/class_u_s_b_sabertooth.html

Could you attach the exact lib you are using from your libs folder?
And please do not post links to pics-use the "insert photo" function.

Couldn't attach the folder itself, so I attached all of the contents, except for the USBSabertoothArduinoLibrary.chm file which this site didn't allow...

changes.txt (1.21 KB)

keywords.txt (936 Bytes)

license.txt (836 Bytes)

USBSabertooth.cpp (4.57 KB)

USBSabertooth.h (14.9 KB)

USBSabertoothChecksum.cpp (1.04 KB)

USBSabertoothCommandWriter.cpp (2.2 KB)

USBSabertoothCRC7.cpp (1.47 KB)

USBSabertoothCRC14.cpp (1.49 KB)

USBSabertoothReplyReceiver.cpp (2.21 KB)

USBSabertoothSerial.cpp (1.14 KB)

USBSabertoothTimeout.cpp (1.39 KB)

The Due pins output 3.3V signal at very low currents (some as little as 3mA, most < 10mA) so
cannot drive opto-couplers directly, for instance. I don't know what you have connected
to pin 13, but I suspect it either needs more voltage or more current.

So the Funduino (328P) works and the Yun (32u4) and Due (SAM3X8E) don't work? How is the library initialized? Does it use the hardware serial port? Is the library supposed to work on the DUE?

MarkT:
The Due pins output 3.3V signal at very low currents (some as little as 3mA, most < 10mA) so
cannot drive opto-couplers directly, for instance. I don't know what you have connected
to pin 13, but I suspect it either needs more voltage or more current.

Pin 13 is our LED, to make sure our board or code isn't faulty. The LED works, but the signal isn't being sent out of the TX port. The motor controller is connected to the TX port and shouldn't need that much volts.

Isaac96:
So the Funduino (328P) works and the Yun (32u4) and Due (SAM3X8E) don't work? How is the library initialized? Does it use the hardware serial port? Is the library supposed to work on the DUE?

  1. Funduino works, Yun and Due don't indeed.
  2. This is the way we do it (and works on the funduino):

#include <USBSabertooth.h>
USBSabertoothSerial C;
USBSabertooth ST(C, 128);

I believe this library is supported on both. The library description says that with this code it should work if you connect TX to S1, which we do on the funduino and works fine. We shouldn't change much for the conversion to another Arduino, though it is blocking a part of our project.

Well I've found the datasheet:

And the inputs claim to be non-opto isolated 3 .. 5V logic compatible with at most 1mA, so the serial
signals should get through. Have you checked start/stop/parity/baud configuration is
correct?

I believe the RX/TX pins on the Yun(32u4) are connected to Serial1. I am not sure about the Due.

MarkT:
Well I've found the datasheet:

And the inputs claim to be non-opto isolated 3 .. 5V logic compatible with at most 1mA, so the serial
signals should get through. Have you checked start/stop/parity/baud configuration is
correct?

I haven't checked the configuration. Are you talking about the Saberooth 2x32 or the Arduino Due?
If it's about the Saberooth, then why does it work with 1 funduino but not another Arduino?
If it's about the Arduino, I woulnd't know how to do it but I'll try in the evening.