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
  RPi and smartphone Bluetooth communication GigiG 0 431 Mar-18-2025, 09:54 AM
Last Post: GigiG
  packet radio communication EmpireAndrew 1 2,923 Nov-01-2019, 06:35 PM
Last Post: micseydel
  WiFi communication Milad 2 3,173 Sep-07-2019, 11:53 AM
Last Post: ndc85430
  Serial Communication Error AlphyOuseph 1 4,494 Feb-07-2019, 07:16 AM
Last Post: DeaD_EyE
  pi3 serial communication tony1812 0 2,624 Sep-23-2018, 10:29 PM
Last Post: tony1812
  python-osc communication fauveboy 10 13,957 Jul-23-2018, 07:49 PM
Last Post: buran
  Serial communication with a board Bokka 2 6,236 Dec-07-2017, 07:34 AM
Last Post: Bokka
  Serial port communication FatimaSameer 1 3,877 Oct-03-2017, 09:47 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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