Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
void Micro_Servo_SSC2(u08 servo, u08 Pos) { uartSetBaudRate(3,9600 ); //select baud rprintf("\r\n sending Position %d to Servo %d.",Pos,servo); uart3SendByte(0xFF); //Startbyte uart3SendByte(servo); //servo uart3SendByte(Pos); //Position }
void minissc(u08 servo,u08 position) { rprintf("%c",255); delay_us(10); rprintf("%c",servo); delay_us(10); rprintf("%c",position); delay_us(10); return; }
First thing first, did you put the jumper on the two pins to put the SSC in MiniSSCII mode?
I've used the original Scott Edwards SSC with the Axon, and I have the pololu mini one, but have never used the latter.This is the code I had 3 years ago when I did this (pre-webbotlib):Code:void minissc(u08 servo,u08 position) { rprintf("%c",255); delay_us(10); rprintf("%c",servo); delay_us(10); rprintf("%c",position); delay_us(10); return; }
You might try the delays between commands...
Other than that, I've got no idea, but might see if I can get mine working with my Axon this weekend (busy weekend though)
u08 data[3]; data[0] = 0xFF; data[1] = servo; data[2] = Pos; uartSendBuffer(3, data, 3);
rprintfInit(uart3SendByte); rprintf("%c",0xFF); rprintf("%c",0x00); rprintf("%c",0xFF); delay_ms(500); rprintf("%c%c%c",0xFF,0x00,0xFF); delay_ms(500); rprintf("%c %c %c",0xFF,0x00,0xFF); delay_ms(500); rprintf("%c, %c, %c",0xFF,0x00,0xFF);