We choosed the DOGM162L-A display which uses the ST7036 Controller. You can find the data sheet here.

Quickstart

You can write something to the display with the following command:

root@gnublin:~# gnublin-dogm -i -w "Hello GNUBLIN"

On RaspberryPi there are two spi connectors.

You find a label on the board: /dev/spi0.0 and /dev/spi0.1

For /dev/spi0.0 this command is good:

pi@raspberrypi ~ $ sudo gnublin-dogm -g 4 -c 0 -i

pi@raspberrypi ~ $ sudo gnublin-dogm -n -w "Hello"

This is /dev/spi0.0 as connector

For Beginners

Initialisation

root@gnublin:~# gnublin-dogm -i

This parameter will initialize the display

Reset the display

root@gnublin:~# gnublin-dogm -n

With this parameter the screen will be erased and the courser is set to the start of the first line.

==Delete the Display

root@gnublin:~# gnublin-dogm -d

This command will delete the text on the display without reset other display parameters like shift.

Write

root@gnublin:~# gnublin-dogm -w "Hallo Gnublin"

Writes a normal string on the display.

Note: If you want to write a exclamation mark (!) or something like that you have to set a back slash before if not the Shell would abort the command on this position.

root@gnublin:~# gnublin-dogm -w "Hallo Gnublin\!"

Cursor Offset

Every line of the display exists out of a few segments. You have the possibility to set the courser to one specific segment. The first segment in the first line has the offset 0. The first segment in the second line has the offset 16.

root@gnublin:~# gnublin-dogm -o "192" -w "Hallo"

This command writes the string in the second line.

Write in a specific line

There is the possibility to write the text in a specific line. All other operations like offset will then count from the start of the line.

root@gnublin:~# gnublin-dogm -l 2 -w "Hallo GNUBLIN"

The text is written in the second line.

Display shift

If you write strings on the display which needs more segments as the display has in every line you have the possibility to do a display-shift. By this operation every segment of the display will be shifted by n positions. Every shift affects the addresses of the segments too! The segment which was once on the address 192 is now shifted by +/- n.

gnublin-dogm -s "-5"

This will shift the display by 5 segments.

Other commands

There are even more commands to control the display. You will get an overview by using the help command:

root@gnublin:~# gnublin-dogm -h

This program was designed to easily interact with the dogm display.

-h Show this Help

-w <STRING> write string to display

-l <line> set string on line (1 = line 1; 2 = line 2)

-j Convert Output to json Format

-b Convert Output to bare format

-o <column> Set cursor to position(Start of line 1= 0; Start of line 2= 16)

Display Software

Is the display is the only device on the SPI interface you can connect Chip Select to ground.

Use other GPIO Pin as RS

You can now set the GPIO pin on the GNUBLIN for the RS on the dispay in the software (without app2.sh or start1.sh). This parameter has to be set by every program call. If you don't set the parameter the default GPIO14.