I've purchased an AD/DA Board in order to use analog inputs in my Pi, here it is: http://www.waveshare.com/high-precision-ad-da-board.htm As you can see it has a trimmer in it and I have wired it to the analog inputs of the board. The ADC in the board is ADS1256, which communicates via SPI. I'm using pigpio, and this is my script (just configuration actually, I cant really make a test programme on this):
import pigpio pi = pigpio.pi() pi.set_mode(15, pigpio.OUTPUT) pi.set_mode(21, pigpio.OUTPUT) pi.set_mode(19, pigpio.INPUT) pi.set_mode(23, pigpio.OUTPUT) h = pi.spi_open(0, 500000, 0) pi.spi_xfer(h, "hello")
As a result I get:
I looked the characteristics of SPI and one of the things I got is that the master has to send bits first in order to receive bits from the slave. By the way "hello" looks pointless to me, probably I should write different data.
Thanks in advance!