I playing a bit with the SPI communications but something is wrong with clock speed, I don't know if it comes from me or the Wipy
If did not made any mistake, I set the SPI link to baudrate=6400, then when I measure the clock with an oscilloscope I get 80,6 kHz
If I set the SPI link to baudrate=640000, then when I measure it with an oscilloscope I get 5 kHzI
If I set the SPI link to baudrate=6400000, then when I measure it with an oscilloscope I get 1.3 MHz
Code: Select all
spi = SPI(0, SPI.MASTER, baudrate= 6400000, polarity=0, phase=1)
toSend = bytearray(3)
toSend[0] = 0x80
toSend[1] = 0x80
toSend[2] = 0x80
while True:
spi.write(toSend)
time.sleep_us(60)