Model X LT Stepper Motor Driver


#1

Have anyone a example code of how to use additional pins? Like Pa0, Pb0, etc. On the Model X LT Stepper Motor Driver

Thanks in advance

Anders


#2

One simple example can be found here.

There are two different cases here. One for the SlushEngine Model D and one for the X LT. They each use two different IO controllers so the code is slightly different.

In this case for controlling the IO we have two different banks A and B (or in software 0 and 1). These can be controlled using two different functions.

board = Slush.sBoard()
somVar = board.getIOState(port, pinNumber)
board.setIOState(port, pinNumber, state)

Here the port would be either 0 or 1 and the pin number would be anything from 0 to 7. All of the additional pins can be used as both inputs and outputs and they configure themselves automatically. Also note that on the Slushengine LT only 3.3v logic can be used on these pins.