Thanks, I have it all working now. However this line on wiki
...and set channels #0 and #3 freewheeling.
should probably read
...and set channels #0 and #3 braking.
as you are setting them to 0x00
0000000x no power - brake shunt mode, x = don't care
0000001x no power - freewheeling mode, x = don't care
xxxxxxxd various speeds in direction d
1111111d full speed in direction d
Okay:
do I make any sense now? :)
Thanks, but I'm still a bit confused!
Bit0 can't be both the brake/freewheel bit and the direction forward/reverse bit?
Or is just direction bit when moving such as:
00000001 no power - mode freewheel
00000000 no power - brake shunt mode
xxxxxxx0 forwards at 126 possible speeds (1 to 127 in bits1-7)
xxxxxxx1 reverse at 126 speeds (1 to 127 in bits 1-7)
Hello,
yes, bit 0 is the direction. A "0" means braking, 1 means freewheeling. Bits 1-7 can be set to control the drive level in each driection, and yes, there are 127 values from 1-127. (Value "0" either brakes or just "doesn't go" depending on the direction bit). Value 127 on the bits 0-7 means "full drive" in each direction (uninterrupted DC voltage on the channel).
Hello, the quickdrive chracteristic byte protocol at
https://social.sbrick.com/wiki/view/pageId/11/slug/the-sbrick-ble-protocol
is a bit cryptic to understand as it simply states:
Example: "Drive forward (clockwise) 255"
1 1 1 1 1 1 1 0
Am I correct in that bit 0 is the direction (0= forwards, 1 = reverse) and bits 2-7 give 127 different speed options?