The SPI
class provides access to the SPI bus connected to Clock, MISO, and MOSI pins along with a designated Chip Select pin.
import SPI from "pins/spi";
The SPI constructor takes a dictionary which contains at least the frequency of the SPI device in Hertz (hz
) and a sub-object (cs
) containing the chip select pin number (pin
).