Wiring an Adafruit i2c LCD Pi Plate to an Arduino

I have an Adafruit i2c 2 line LCD Pi Plate that I’ve used for projects with my Raspberry Pi. It has a block of header pins that slot down onto the GPIO pins on the Pi. It seems that it’s pretty similar to other LCDs for the Arduino, so with some reading around and experimenting, it does wire up and work perfectly with the Arduino too. This post gave the me starting point for what pins wired to where.

In summary, this is how I wired it up – the Raspberry Pi pin references are the pin names that the Pi Plate would normally connect to, and which Arduino pins I connected them to:

Pi Plate Pin -> Arduino Pin

Pin2 -> 5v

Pin6/grnd -> grnd

Pin3 -> A4/SDA

Pin5 -> A5/SCL

The Adafruit LCD Arduino library works with the LCD Pi Plate without any other changes.

Cross-compiling ASM using Eclipse on Windows for ARM on the Raspberry Pi

Wow. Let me start by saying getting the right combination of tools setup to do this took more time than learning and writing my first few lines of ARM assembly.

Each of the links below has install and config instructions, so I’m not going to cover all of these again here, but here’s the combination of tools that worked for me:

An alternative toolchain could be the GNU Tools for ARM Embedded, but I couldn’t get my (simple) assembly to compile without unfathomable errors using this one (I tried this first before I tried the Sorcery toolchain).

Compiling and linking ASM on the Pi

Couple of quick notes as a reminder. I’ll come back with some further notes of using a cross-compiler tool chain with Eclipse C/C++ when I have time:

Compile to object code:

as example.s -o example.o

Link to an executable:

ld -o example example.o

Writing Raspberry Pi disk images to SD cards on the Mac

Just as the dd command can be used to create a disk image of an SD card on the Mac (see here), you can use dd to write a downloaded (or backup) disk image to an SD card too:

sudo dd of=/dev/rdiskx if=/path/to/image bs=1m

where x is the disk number as shown by diskutils list.