SPI python ?
#2
Use this Python library : https://github.com/swkim01/RPi.GPIO-PineA64

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
  Reply


Messages In This Thread
SPI python ? - by herialtifa - 01-06-2017, 01:07 AM
RE: SPI python ? - by martinayotte - 01-06-2017, 09:15 AM
RE: SPI python ? - by herialtifa - 01-06-2017, 04:59 PM
RE: SPI python ? - by martinayotte - 01-08-2017, 01:24 PM
RE: SPI python ? - by martinayotte - 01-09-2017, 04:04 PM
RE: SPI python ? - by herialtifa - 01-13-2017, 09:49 PM
RE: SPI python ? - by herialtifa - 01-16-2017, 06:38 PM
RE: SPI python ? - by xalius - 01-17-2017, 03:40 PM
RE: SPI python ? - by herialtifa - 01-17-2017, 05:10 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)