# * Guzunty Pi 8p8i core PWM functions ****************************************
def TestPwmGuzuntyPi():
ccwMax = 30
cwMax = 13
middle = 22
PrintDoubleSpaceLine("*** Start testing Guzunty Pi ***")
spiGuzuntyPi = spidev.SpiDev()
spiGuzuntyPi.open(0, 0)
pwmDutyCycleTuple = middle, middle, middle, middle, middle, middle, middle, middle
for i in range(8):
pwmDutyCycleList = [i, pwmDutyCycleTuple[i]]
pwmDutyCycleList = spiGuzuntyPi.xfer2(pwmDutyCycleList)
spiGuzuntyPi.close()
PrintDoubleSpaceLine("*** Stop testing Guzunty Pi ***")
.END
No comments:
Post a Comment