Friday, February 3, 2012

Arduino + Sabertooth 2x10 motor controller


Contrary to what i saw online, regular Arduino Duemilanove's PWM frequency is enough to drive one accu-drill motor using the Sabertooth 2x10. Following is the test code i developed for it. Next step is to try it with two motors, and the possibilities of differential drive, and incorporating the encoder wheels to provide the robot brain with the traveling distance sense.

int wvout = 9;
int val = 0;

void setup()
{
Serial.begin(9600);
pinMode(wvout, OUTPUT);
}

void loop(){
val=analogRead(0);
val=map(val,0,1023,0,255);
Serial.println(val);
analogWrite(wvout,val);
delay(1000);
}

Friday, May 13, 2011

Angstrom Linux

Booting Angstrom Linux on the Beagleboard



My Rev C4 has problems with the regular u-boot, this should be used instead: http://code.google.com/p/beagleboard/downloads/detail?name=u-boot-revc4.bin&can=2&q=


TEST:
dd angstrom bz2 img for boot partition

trying manual format of angstrom partition

this rules: http://beagleboard.org/demo/angstrom/

if SD card is readonly filesystem after mkfs.ext3, sudo su, then chown mounted folder (Angstrom) to user,
copy tar.bz2 directly to SD, then untar. (this is wrong!)

new ubuntu is shit! use "vintage" distro to copy files to not get readonly file system

Beagleboard rev. C4 and serial communication

Beagleboard C4 needs conversion from the IDC10 pin header to D-Sub 9 Female cable.

Female D-Sub 9 (looking from the front, not the pins):





Conversion goes:
Header - Connector
2------->3
3------->2
5------->5


Ok, then you need the USB2Serial converter. I've got Digitus, which on Mac uses Prolific PL 2303 driver, downloaded from here. (EDIT: Prolific.tw site is crock, their drivers don't seem to work with Mountain Lion ATM, download FTDI virtual com driver instead)

To get to the serial console, find your usb2serial device
ls /dev/tty.*
My device is displayed as:
/dev/tty.usbserial-FTFE6UC8
So, use screen command:
screen /dev/tty.usbserial-FTFE6UC8 115200