SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
User avatar
By sobellinni
any chance for an arduino library ??? manipulating objects on the screen is annoying !
User avatar
By sobellinni
if no library how about a list of the I²C addresses and functions so I could make one
By paulvha
Never worked on this, but just for the fun I have downloaded the micro-bit beta application from
Then I selected to obtain the Moto:bit from [url][/url
Now you can see the code in Java-script and reverse engineer. Couple of aspects I have found
Code: Select all
	                 dec       hex
motor_left	       8448     2100
motor_right	        8192     2000
forward	                0          0
backward                  1          1
motors_on                 28673    7001
motors_off                28672    7000
I2C address               89      59
change polairty right	4608	1200
change polairty left	4864	1300
Looking at the motobit code I would predict the following behaviour

set direction, motor and speed.
unint16 var = motor ( either motor_left or motor_right)
if direction is forward : var |= 0x80 + OR with speed min =0, max = 0x7f
if direction is backward : var OR with speed min = 127, max = 0
write var to 0x59 I2C address

0x21FF = max speed forward for motor-left.
0x2000 = max speed backward for motor-right

turn motors on or off
Uint16 value
on : write motors_on (0x7001) to I2C address 0x59
off: write motors_off 0x7000) to I2C address 0x59

reverse polarity
e.g. In case you sent a forward command, but the motor turns backward, you can reverse polarity.

uint16 var =
if right motor : var = change polairty right else var = change polairty left
if reverse polarity : var OR with 0x1
write var to 0x59 I2C address

reverse polarity motor right : var = 0x1201

hope this helps and good luck :-)
User avatar
By sobellinni
Thanks but for now I think i blew the driver IC , with 8.4 volts from two Li-ion cells
By paulvha
too bad. acccording to the schematic the J1 input voltage (VCC) may be as high as max 17V (before the on-board regulator)