Hardware Reference
In-Depth Information
loop();
}
return (0);
}
SPI
It is possible to communicate with SPI devices using the functions provided by arduPi.
The following example uses the SPI functions to print messages on a ST7920
LCD12864 (SPI LCD).
First put the switch of the LCD in SPI mode. Then proceed with the connection be-
tween the LCD and the Raspberry Pi to Arduino shield. Use jumper wires to connect
the following, as shown in Figure 6-9 :
• VCC of the LCD to 5 V of the shield
• GND of the LCD to GND of the shield
• SCK of the LCD to SCK of the shield
• SID of the LCD to MOSI of the shield
• CS of the LCD to 8 pin of the shield
Figure 6-9.
LCD shield
Search WWH ::




Custom Search