Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 SPI Communication
#1
I have recently purchase a Pi-SPI-2AO Digital to Analog converter for a project I am working on here. I have done quite a bit of research but I still am not sure how to send an output, my knowledge in this area is VERY limited. So please bear with me. I am using the spiDev library across channel CE-0 and I am attempting to send a 0-10V signal. Has anyone used this before or could possibly be of help.
import spidev
import time

spi = spidev.SpiDev()
spi.open(0,0)
while True:
    resp = spi.xfer2([0x00])
    print resp[0]
    time.sleep(1)
My primary question is in the 6th line. From the source it says "0x00" is sending an array of bytes. What does this mean?
Source Material: http://www.100randomtasks.com/simple-spi...spberry-pi
DAC Source: https://widgetlords.com/products/pi-spi-...-interface
snippsat wrote Apr-24-2017, 01:39 PM:
Added code tag look at BBcode help
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)