Pages: [1]   Go Down
Author Topic: Sabertooth Packetized Serial Library  (Read 1584 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 360
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all,
    I've been playing around with a Sabertooth 2x5 lately, and figured it'd be useful to make a compact Arduino library to interface with it (and others in the series) using the packetized serial mode, since there don't appear to be any available on the internet, and using servo PPM is not desirable in terms of CPU load. Feedback would be greatly appreciated =).

Install as you would any other library, and construct it with
Code:
#include "Sabertooth.h"
Sabertooth m(ADDRESS, PIN);

You can make the motors move with
Code:
m.setSpeed(leftspeed, rightspeed);

* Sabertooth.zip (48.37 KB - downloaded 28 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

dled library copied and pasted example code over says sabertooth does not name a type... what next?
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 360
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Replace the WProgram.h in the file Sabertooth.h with Arduino.h, and it should work.
Logged

Pages: [1]   Go Up
Jump to: