Skip to content

Raspberry PI running a 16×32 RGB LED

Wiring

To get started turn off your Pi.

$ sudo shutdown

Disconnect power from the Raspberry Pi.

rpi1_hub75_led_rgp_16x32_wiring

Compile the Program

Clone the repo:

ssh pi@raspberrypi
# password is: raspberry by default
git clone https://github.com/hzeller/rpi-rgb-led-matrix/

Look in that cloned directory:

pi@raspberrypi:~ $ ls rpi-rgb-led-matrix/
adapter  bindings  COPYING  examples-api-use  fonts  img  include  led-matrix  lib  Makefile  README.md  utils  wiring.md

Change to that cloned directory:

cd rpi-rgb-led-matrix

Now edit/view the makefile for the correct pinouts:

vi lib/Makefile

Search for: HARDWARE_DESC (type /HARDWARE_DESC)

For a Raspberry Pi 1 set it to classic-pi1 e.g.:

# There are several different pinouts for various breakout boards that uses
# this library. If you are using the described pinout in the toplevel README.md
# or the standard active-3 breakout board, then 'regular' is the one you'd like
# to use.
#
# Adafruit also made a breakout board, if you want to use that, choose
# 'adafruit-hat'
#
# These are the choices
# regular # Following this project wiring and using these PCBs
# adafruit-hat # If you have a RGB matrix HAT from Adafruit
# adafruit-hat-pwm # If you have an Adafruit HAT with PWM hardware mod.
# regular-pi1 # If you have an old Pi1 and regular didn't work.
# classic # (deprecated) Classic Pi1/2/. Not used anymore.
# classic-pi1 # (deprecated) Classic pinout on Rasperry Pi 1
HARDWARE_DESC?=classic-pi1

Another option is to compile with:

make -DHARDWARE_DESC=classic-pi1

You can even just change it at run-time:

sudo ./demo -D 1 --led-gpio-mapping=classic-pi1 --led-rows=16 --led-cols=32

Now run:

make

This will create programs in:

  • /home/pi/rpi-rgb-led-matrix/examples-api-use

Let’s change to that directory and run some:

cd ~/rpi-rgb-led-matrix/examples-api-use

Then…

sudo ./demo \
  -D 1 \
  --led-gpui-mapping=classic-pi1 \
  --led-rows=16 \
  --led-cols=32 

sudo ./text-example \
  --led-gpio-mapping=classic-pi1 \
  --led-rows=16 \
  --led-cols=32 \
  --led-show-refresh \
  -C 255,255,255 \
  -f ../fonts/7x13.bdf \
  Hello

sudo ./demo \
  -D 0 \
  --led-gpio-mapping=classic-pi1 \
  --led-rows=16 \
  --led-cols=32 \
  --led-show-refresh

# -D 1 needs an image...

sudo ./demo \
  -D 2 \
  --led-gpio-mapping=classic-pi1 \
  --led-rows=16 \
  --led-cols=32 \
  --led-show-refresh

sudo ./demo \
  -D 3 \

...etc...

sudo ./scrolling-text-example \
  --led-gpio-mapping=classic-pi1 \
  --led-rows=16 \
  --led-cols=32 \
  --led-show-refresh \
  -s 10 \
  -C 0,0,255 \
  -f ../fonts/8x13.bdf \
  Bye

Other References

Connect via:

 

Categories

Hardware

TheSoftwareProgrammer View All

I like science and writing software.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: