Skip to Content
Embedded Programming with Modern C++ Cookbook
book

Embedded Programming with Modern C++ Cookbook

by Igor Viarheichyk
April 2020
Intermediate to advanced
412 pages
9h 58m
English
Packt Publishing
Content preview from Embedded Programming with Modern C++ Cookbook

How it works...

In this recipe, our peripheral devicean LCD screenis connected to the board over the I2C bus. It is a form of a serial interface, so the connection only requires four physical wires. An LCD screen, however, can do much more than a simple LED. This means that the communication protocol used to control it is also more complex.

We will use only a fraction of the functionality provided by the 1602 LCD screen. The communication logic is loosely based on the LiquidCrystal_I2C library for Arduino, adapted for Raspberry Pi. 

We define an Lcd class that hides all the complexities of I2C communication and the specifics of the 1602 control protocol in its private methods. Besides a constructor and a destructor, it exposes only two ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ System Programming Cookbook

C++ System Programming Cookbook

Onorato Vaticone
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 9781838821043Supplemental Content