title: Read data in Raspberry Pi from an SPI connection with spidev library in python
body: <p>I want to transfer data from an external device to my Raspberry Pi 3 model B. I'm using SPI protocool to do this task. I'm using spidev library on python. I have already created the next program:</p>
  <pre><code>#/usr/bin/env python3
  import spidev
  import time
  
  spi = spidev.SpiDev(0,0)
  spi.max_speed_hz= 122000
  
  
  while True:
      print(spi.readbytes(1))
      time.sleep(2)
  </code></pre>
  <p>When I run the program I get always the same result: ([0]).
  I don't know if this is the correct method to read data on spidev. I'm new with spidev library and I would be so grateful to hear any suggestions of how to do this task.</p>