Cart 0

Quick start guide

 

FAQ
 

Overview

The Beam PCB has 120 LEDs arranged in a 5x24 grid. The 5x24 grid makes it ideal to display text or animations in your projects. Beam is compatible with both 5V and 3.3V microcontrollers and communicates via I2C.  

Hookup

On the backside of the Beam PCB, there are two female connectors on each end. Both connectors are identical and either one can be used to connect to the your host microcontroller. 

1 - HOST_V+: Connect to either 5V or 3.3V depending on your microcontroller. For example, if using the Arduino UNO, this pin should be tied to 5V since it is a 5V platform. For Raspberry Pi, this pin should be tied to 3.3V instead. 
2 - 3.3V: Connect to the 3.3V pin on your host microcontroller
3 - GND: Connect to ground pin. 
4 - SYNC: No need to connect this pin to your microcontroller. It's used when chaining multiple Beams in a row. 
5 - RESET: Connect to any Digital pin on your microcontroller. 
6 - IRQ: Not used at the moment. Leave unconnected. 
7 - SCL: Connect to SCL pin on your microcontroller
8 - SDA: Connect to SDA pin on your microcontroller. 

Library

Hit the link on the right to grab the latest Beam library. 

Upload

Before you hit upload, here are a few things to watch out for. 

  • If using one Beam, set the slider switch on the back to setting 'A'. 
  • Note the #define BEAMCOUNT at the top of the main .ino file. This should be set to the number of Beams you're using. We recommend setting it to 1 and testing with a single Beam before trying the other examples. 
  • Make sure the RSTPIN is set to the correct digital pin. 

Now hit upload and you should see text and animations appear on Beam. Depending on the i2c speed supported by your microcontroller, it could take a few seconds to finish updating all the registers. Open the serial monitor and you should see a few debug messages being logged. 

Connecting more Beams

Want MOAR Beams? Simply connect up to 4 Beams using the headers provided as shown. Going from left to right, make sure the slider switch is set to 'A' for the first Beam, then 'B' for the second Beam, and so on. So of you're using a total of four Beams, then the switch setting should be A, B, C, D from left to right. 


 

Beam Library - Basic Features

Initializing Beam

We begin by creating an instance of Beam with the following line. The variable BEAMCOUNT should be set to the number of Beams that are connected together in a chain. 

Beam b = Beam(RSTPIN, IRQPIN, BEAMCOUNT);

Next, the 'begin' function will reset Beam and initialize it. If multiple Beams are connected, all the exposed pins are connected to each other. This means calling the 'begin' function just once will initialize all Beams connected in the daisy chain. 

b.begin();

Displaying Text

Now we call the 'print' function. This takes a string of text and maps each character to the dot-matrix font stored in the charactermap.h header file. By default, each character includes one space for better readability. Calling this function will automatically print the text across all connected Beams. 

b.print("Hello World");

Then we have a few options to change the mode, speed, loops and scroll direction. 

b.setSpeed(3);// value between 1 and 15. Lower value is faster. 
b.setLoops(7);// value between 1 and 7. For an infinite loop, set to 7. 
b.setScroll(LEFT);// takes the value LEFT or RIGHT. 
b.setMode(SCROLL);// SCROLL for scrolling. MOVIE for animations. 

Finally, we can start lighting up some LEDs. Use the 'play' method to start the animation. If setMode(SCROLL) is called before the 'play' method, text will scroll across beam depending on the direction specified with setScroll. If setMode(MOVIE) is called before the 'play' method, each frame will appear as you're if flipping through a book. To summarize, setting SCROLL will take each frame and scroll it across the Beam grid whereas setting MOVIE will take each frame and make it 'appear' on the Beam grid one at a time. 

Displaying Custom Animations

The 'draw' function makes it possible to create custom animations and lighting effects. Beam has 35 frames that can be used for this purpose. Think of frames as a page in a book - we can flip through the pages and create animations. In the frames.h file, each frame of the Beam LED matrix is replicated with bytes. Let's take a single frame as an example: 

int frame1[0x0F] = {
0b10000000, 0b00000000, 0b00000001,
0b11111111, 0b00000000, 0b11111111,
0b10000000, 0b00000000, 0b00000001,
0b10000000, 0b00000000, 0b00000001,
0b10000000, 0b00000000, 0b00000001,
};

Each frame array is oriented just like the Beam 5x24 grid - there are 5 rows and 24 bits across. Each bit represents an LED - 1 is on and 0 is off. So if we ignore the '0b' portion that's used to indicate a bit pattern, the first row on Beam would look like '10000000 00000000 00000001' in the example above. The first and last LED on the first row would be on and the remainder will be off. The second row would have the first 8 and last 8 LEDs on and the middle 8 LEDs will be off. The same applies to the rest of the rows (5 total). This way, we can edit each frame and use all 35 frames. You can use this to create an animation of bouncing 8-bit ball or a flying spaceship or even custom lighting effects for a bike light!

 

Phew. That covers the basics. We know that's a lot of settings -- best way is to go ahead and change some of the values and see what appears on Beam! 

 

Raspberry Pi - Quick start guide

 

Hookup

On the backside of the Beam PCB, there are two female connectors on each end. Both connectors are identical and either one can be used to connect to the your Raspberry Pi.

HOST_V+: Connect to 3.3V of Raspberry Pi. 
3.3V: Connect to the 3.3V pin of Raspberry Pi.
GND: Connect to ground pin. 
SYNC: No need to connect this pin to your Raspberry Pi. It's used when chaining multiple Beams in a row. 
RESET: Connect to any Digital pin on your Pi.  In our code, we use Pin #27.
IRQ: Connect to any Digital pin on your Pi.  In our code, we use Pin #22.
SCL: Connect to SCL pin on your Raspberry Pi.  This is Pin #3.
SDA: Connect to SDA pin on your Raspberry Pi.  This is Pin #2. 

Configuring I2C and install WiringPi

Switch on your Raspberry Pi and configure your I2C bus.  The best explanation is written up on Adafruit.  Check it out here -  https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

You'll also need to install WiringPi.  That can be found here - http://wiringpi.com/download-and-install/

Library

Hit the link on the right to grab the latest Beam library. 

Usage

Open up the command prompt and start with some easy commands.

sudo ./BeamDemo [options]

Options:

-n [1-4] set the number of beams (defaults to 1)
-s [1-15] set the frame speed (defaults to 1, 15 is slowest)
-l [1-7] set the number of frame loops (defaults to 7)
-t "some text" display text on the beam
-f "some path" load and display a frames file
-h print this help

To run a demo specify the -n [1-4] option or no options

Examples

Run Demo on 1 beam:

sudo ./BeamDemo

Run Demo on 2 beams:

sudo ./BeamDemo -n 2

Text on 1 beam:

sudo ./BeamDemo -t "my text here"

Text on 3 beams:

sudo ./BeamDemo -n 3 -t "my text here"

Custom frames:

sudo ./BeamDemo -f "./sample-frames.txt"

Custom frames on 3 beams:

sudo ./BeamDemo -n 3 -f "./sample-frames.txt"

If you want to run your own program with Beam, check out the BeamDemo code and modify to your liking.

Connecting more Beams

Want MOAR Beams? Simply connect up to 4 Beams using the headers provided as shown. Going from left to right, make sure the slider switch is set to 'A' for the first Beam, then 'B' for the second Beam, and so on. So of you're using a total of four Beams, then the switch setting should be A, B, C, D from left to right. 


 

FAQs

How does it work?

Beam is a LED matrix that can store up to 36 unique frames and play it back at different speeds.  With this amount of storage, you can create different animations or store different lines of text to display.


My Beam doesn't work.  Help!

Here are a few things to try:

  1. Make sure both VHOST+ and 3V3 are plugged in.  These are mandatory.  We have built in level shifters into the Beam, so it will work with 3v3 and 5V Hosts.  
  2. If you're using more than 1 Beam, make sure the Beamcount is updated to the correct number.