01-06-2017, 09:15 AM
(This post was last modified: 01-06-2017, 09:15 AM by martinayotte.)
Use this Python library : https://github.com/swkim01/RPi.GPIO-PineA64
Here some loopback testing code :
Here some loopback testing code :
Code:
#!/usr/bin/python
import RPi.SPI as spi
data = [0xDE,0xAD,0xBE,0xEF,0xBA,0xAD,0xF0,0x0D]
spi.open("/dev/spidev0.0")
spi.write(data)
data = spi.xfer(data, len(data))
spi.close()
print data