In general you will need to connect the LCD's SCLK, DIN, and CS pins to the board's SPI pins, and the LCD's RST and D/C pins to two free digital I/O pins. With this setup you can use the very fast hardware SPI support built into your board.
However if you need more flexibility and don't require fast screen updates, the library also supports software SPI on any 5 digital I/O pins (SCLK, DIN, CS, RST, D/C). The example code on the next page describes how to enable software SPI. If you aren't sure what to use, start with hardware SPI since it's much more responsive at updating the display.
To connect the LCD to a Raspberry Pi, the Pi's hardware SPI pins and two GPIO pins should be wired to the LCD as follows:
To connect to the Beaglebone Black, connect the SPI0 pins and two additional digital IO pins as follows:
Also if you are new to the Beaglebone Black, take a moment to review how the GPIO pins are laid out and numbered on the board. There are a lot of pins so be careful to connect the LCD to the right ones!
Once your LCD is connected to your hardware, power on your device and confirm the LCD backlight turns on. If you don't see the backlight turn on double check your ground and voltage wiring carefully.