O'Reilly logo

Programming the BeagleBone by Yogesh Chavan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Program to write display text on Nokia 5110 LCD

Before running any SPI based program, we need to enable the SPI pins. There is a need to load a device tree overlay related to SPI from /lib/firmware. Run the following command as the root in the BeagleBone console:

 ls /lib/firmware | grep -i SPI

This command should output something like "ADAFRUIT-SPI0-00A0.dtbo" and "ADAFRUIT-SPI1-00A0.dtbo" on the terminal. Then run the following command. The change string is getting echoed in the following command according to the output of the previous command.

 sudo sh –c "echo ADAFRUIT-SPI0 > /sys/devices/bone_capemgr.8/slots"

Writing about all the LCD logic drivers is out of the scope of this book. Let us use the Nokia LCD Python library made by Adafruit. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required