Python Forum
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  packet radio communication EmpireAndrew 1 2,179 Nov-01-2019, 06:35 PM
Last Post: micseydel
  WiFi communication Milad 2 2,461 Sep-07-2019, 11:53 AM
Last Post: ndc85430
  Serial communication with raspberry pi 3B and Xbee kj7 0 2,167 Mar-25-2019, 03:39 AM
Last Post: kj7
  Serial Communication Error AlphyOuseph 1 3,526 Feb-07-2019, 07:16 AM
Last Post: DeaD_EyE
  pi3 serial communication tony1812 0 2,142 Sep-23-2018, 10:29 PM
Last Post: tony1812
  python-osc communication fauveboy 10 10,194 Jul-23-2018, 07:49 PM
Last Post: buran
  Serial communication with a board Bokka 2 5,336 Dec-07-2017, 07:34 AM
Last Post: Bokka
  code pattern for process communication Skaperen 12 8,450 Oct-08-2017, 03:14 AM
Last Post: Skaperen
  Serial port communication FatimaSameer 1 3,212 Oct-03-2017, 09:47 AM
Last Post: Larz60+
  Python Daemons & Configs & Communication TypesWithSpoons2 1 2,850 Aug-21-2017, 06:53 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020