Line 59... |
Line 59... |
59 |
self.spi.xfer([0x0B]) # KVAL_ACC |
59 |
self.spi.xfer([0x0B]) # KVAL_ACC |
60 |
self.spi.xfer([0x20]) |
60 |
self.spi.xfer([0x20]) |
61 |
self.spi.xfer([0x0C]) # KVAL_DEC |
61 |
self.spi.xfer([0x0C]) # KVAL_DEC |
62 |
self.spi.xfer([0x20]) |
62 |
self.spi.xfer([0x20]) |
63 |
self.spi.xfer([0x18]) # CONFIG |
63 |
self.spi.xfer([0x18]) # CONFIG |
64 |
self.spi.xfer([0b00111000]) |
64 |
self.spi.xfer([0b00111010]) |
65 |
self.spi.xfer([0b00000110]) |
65 |
self.spi.xfer([0b10001000]) |
66 |
|
66 |
|
67 |
def MaxSpeed(self, speed): |
67 |
def MaxSpeed(self, speed): |
68 |
'Setup of maximum speed in steps/s' |
68 |
'Setup of maximum speed in steps/s' |
69 |
speed_value = int(speed / 15.25) |
69 |
speed_value = int(speed / 15.25) |
70 |
if (speed_value == 0): |
70 |
if (speed_value == 0): |