This library allows you to communicate with SPI devices, with the Arduino as the master device. Serial Peripheral Interface SPI is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances. It can also be used for communication between two microcontrollers. With an SPI connection there is always one master device usually a microcontroller which controls the peripheral devices.
The Serial Peripheral Interface SPI is a synchronous serial communication interface specification used for short-distance communication, primarily in embedded systems. The interface was developed by Motorola in the mids and has become a de facto standard. Typical applications include Secure Digital cards and liquid crystal displays. SPI devices communicate in full duplex mode using a master-slave architecture with a single master. The master device originates the frame for reading and writing.
This example will use an analog to digital converter to read the analog voltage across a photoresistor. A photoresistor decreases resistance and the voltage across it when it is exposed to light. The Serial Peripheral Interface SPI is a communication protocol used to transfer data between micro-computers like the Raspberry Pi and peripheral devices. These peripheral devices may be either sensors or actuators.