Forums » Support

Back To Topics

BLE Quickdrive characteristic

    • 178 posts
    February 8, 2016 4:23 PM CET

    aaaaaaaaand that is correct. Thank you, the wiki will be updated soon. ;)

    • 3 posts
    February 8, 2016 12:33 PM CET

    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

    • 178 posts
    February 1, 2016 1:38 PM CET

    (if I do make more sense, I'm gonna update the wiki)

    • 178 posts
    February 1, 2016 1:38 PM CET

    Okay:

    • Bit 0 is always the direction bit.
    • Braking occures, when the drive value is zero, regardless of direction. 0x00 and 0x01 are both braking commands.
    • Freewheeling occures when the drive value is the least non-zero value regardless of the direction. 0x02 and 0x03 are both free wheeling.
    • If all non-direction bits are ones, then apply full drive. 0xFF and 0xFE are all full-drive commands in reverse and forward respectively.
    • All other values are equal with a drive command with power X & 0xFE where X is a value written to the quick drive characteristic, and "&" is a bitwise AND operation.

    do I make any sense now? :)

     

    • 3 posts
    January 15, 2016 5:58 PM CET

    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)

     

     

    • 178 posts
    January 13, 2016 3:48 PM CET

    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).


    This post was edited by Tamás Fábián at January 13, 2016 3:49 PM CET
    • 3 posts
    January 12, 2016 7:11 PM CET

    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?