Created
February 3, 2019 16:12
-
-
Save iotguider/cec866a09ca2509f6aca9ecb5d31ea99 to your computer and use it in GitHub Desktop.
Code for using SPI in Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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