Skip to content

Instantly share code, notes, and snippets.

@iotguider
Created February 3, 2019 16:12
Show Gist options
  • Save iotguider/cec866a09ca2509f6aca9ecb5d31ea99 to your computer and use it in GitHub Desktop.
Save iotguider/cec866a09ca2509f6aca9ecb5d31ea99 to your computer and use it in GitHub Desktop.
Code for using SPI in Raspberry Pi
import spidev
spi = spidev.SpiDev()
spi.open(0, CHIP_SELECT_0_OR_1)
spi.max_speed_hz = 1000000
spi.xfer([value_8bit])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment