Normal
okay lets have a look inside.Using the I2C Bus http://www.robotikhardware.de/download/sd21.pdf hilft beim Verstehen.zuerst: 0x55Dann ist wichtig: 0xC2 (wohin willst du schreiben)nun Welches Servo/ Byte:(#Servo*3) -2 dann wieviele Bytes will man senden:0x02Was soll geschrieben werden:(byte) (ServoPosition & 0xff) Lowbyte der Position(byte) (ServoPosition >>8) HighByte der PositionAlso:[code=Java]byte[0]=0x55;byte[1]=0xC2;byte[2]=(int #Servo*3) -2 ;byte[3]=0x02;byte[4]=(byte) (int ServoPosition & 0xff)byte[5]=(byte) (int ServoPosition >>8)[/code]sollte es tun. Natürlich ohne Gewähr.
okay lets have a look inside.
Using the I2C Bus
http://www.robotikhardware.de/download/sd21.pdf hilft beim Verstehen.
zuerst: 0x55
Dann ist wichtig: 0xC2 (wohin willst du schreiben)
nun Welches Servo/ Byte:
(#Servo*3) -2
dann wieviele Bytes will man senden:
0x02
Was soll geschrieben werden:
(byte) (ServoPosition & 0xff) Lowbyte der Position
(byte) (ServoPosition >>8) HighByte der Position
Also:
[code=Java]
byte[0]=0x55;
byte[1]=0xC2;
byte[2]=(int #Servo*3) -2 ;
byte[3]=0x02;
byte[4]=(byte) (int ServoPosition & 0xff)
byte[5]=(byte) (int ServoPosition >>8)
[/code]
sollte es tun. Natürlich ohne Gewähr.