Intro: Using Pimoroni Display-O-Tron With Arduino
the pimoroni Display-O-Tron 3000 (shop.pimoroni.com) is not only one of the best display for the Raspberry Pi money can buy, the hardware driving it is well supported on the Arduino platform... follow the guide!
Step 1: Hardware Pinout
The dot3k is a 3x16 LCD with 3 RGB backlights plus 9-segment bar graph, as well as a 5-state joystick for menu control (or any other purpose). The LCD itself is an SPI DOGM LCD based on the ST7036 controller, while the backlit and bar graph is driven by a SN3218 interfaced via I2C (addr 0x54). Beware that the LCD should be run at 3.3V if you deviate from these instructions / modify the hardware!
The pinout overview for the dot3k is attached herein, but go to http://pi.gadgetoid.com/pinout/display_o_tron_3000 for a better version. Note that PIN22/BCM25 is used for commands, the rest is standard, safe for the custom mapping of the joystick. I won't be covering the joystick in this instructable anyhow as that is something your project would specify. In addition, committing a total of 11 pins to this hardware is quite an investment, although if you have the ports to spare knock yourself out!
Step 2: GPIO Wiring
I'm using a colour coded loom to attach the dot3k to my Uno/Metro, using a double row angled pin header, for the sake of clarity of this instructable but note that this setup differs from the final project pictured on the front page - as long as you are aware of that then there should be no confusion ;-)
Here's the breakdown, including the physical GPIO pins used on the dot3k side:
Brown / GND - pin6
Red / 5V - pin4
Orange / 3.3V - pin17
Yellow / SDA - pin3
Green / SCL - pin5
Blue / MOSI - pin19
Purple / MISO - pin21
Grey / SCKL - pin23
White / SS(CE0) - pin24
Black / RS/CMD - pin22
*JOYSTICK* (not pictured)
IMPORTANT: pin1 on the dot3k PCB is not connected, so you HAVE to use pin17 to get the 3.3V supply or it simply won't work!
Step 3: Arduino Wiring
as you will see in the next step, the LCD pins can be user-defined in the code without great efforts. Feel free to use the typical SPI pins on your Arduino, that should work - I believe - and may be required by your project, it wasn't for mine. So, here's the wiring at my end:
Brown - GND
Red - 5V
Orange - 3.3V
Yellow / SDA - Analog 4 (Uno)
Green / SCL - Analog 5 (Uno)
Blue / MOSI - Digital 2
Purple - Digital 6 (as generic input)
Grey / SCKL - Digital 3
White / SS(CE0) - Digital 5
Black / RS/CMD - Digital 4
again, up to you if you hook up one, more or none of the joystick pins... I decided to retain the joystick down as a generic input in case I needed one but the choice is yours!
Step 4: The Code
This is where the magic happens, head over to https://github.com/RogueM/rogue-labs/tree/master/Arduino/dot3k to download some sample code for your Arduino. It comes fully documented and links to supporting libraries are included so I won't repeat the here, just post a comment if anything is unclear!
Note that I have included separated sketches for the LCD and the backlit, to help people new to Arduino get their head around the driving of the lCD and the backlit more easily.