/Modules/H_Bridge/HBSTEP01B/SW/I2CSPI_HBSTEP_test.py
2,7 → 2,10
# -------------------------------------------
# HBSTEP01B Stepper Motor control test code
# -------------------------------------------
#
# Program uses MLAB Python modules library from https://github.com/MLAB-project/pymlab
 
 
#uncomment for debbug purposes
#import logging
#logging.basicConfig(level=logging.DEBUG)
64,11 → 67,11
spi.SPI_write_byte(self.CS, 0x00)
spi.SPI_write_byte(self.CS, 0x10)
spi.SPI_write_byte(self.CS, 0x0A) # KVAL_RUN
spi.SPI_write_byte(self.CS, 0x90)
spi.SPI_write_byte(self.CS, 0xFF)
spi.SPI_write_byte(self.CS, 0x0B) # KVAL_ACC
spi.SPI_write_byte(self.CS, 0x90)
spi.SPI_write_byte(self.CS, 0xFF)
spi.SPI_write_byte(self.CS, 0x0C) # KVAL_DEC
spi.SPI_write_byte(self.CS, 0x90)
spi.SPI_write_byte(self.CS, 0xFF)
spi.SPI_write_byte(self.CS, 0x18) # CONFIG
spi.SPI_write_byte(self.CS, 0b00111000)
spi.SPI_write_byte(self.CS, 0b00000000)