HTE - I2C LCD

Overview

For Fullscreen: https://www.youtube.com/watch?v=Q0vMnWUdbk0

This tutorial will show you how to connect an I2C LCD with the Quantum System.


What is a LCD?

On one side of the I2C LCD you have an LCD.

On the other side is the I2C Chip which has four pins.

The upper Pin GND is the ground pin. The second pin is the vcc. It is used to power the I2C LCD. The third pin is the sda pin. It is used to give in the serial data line. The last scl pin is is the serial clock line. These four pins will be connected to the Builder Base. With the blue knob you can adjust the brightness of the LCD. The cap on the left side decides wether you have a backlight or not. If it is attached, the backlight is activated.


Assemble the Circuit

Picture

Name

Quantity

Link

Picture

Name

Quantity

Link

I2C LCD Display

1

Included in Component Kit

Or you can purchase it here

Male to Male and Male to Female jumper wires

4

Included in Component Kit

Or you can purchase it here

Q-Client Builder Base

1

Q-Client

If you have all the parts listed above, we can go ahead and build the circuit. It should look like this:

Just connect the SDA, GND and SCL of both components. Connect the vcc pin of the I2C LCD with the 5V pin of the Builder Base.


Pair the Builder Base

Now we want to pair the Builder Base with our Q-Server. In order to do so, go to the Homescreen of your Q-Server.

Next click on the lift side symbol labeled “Clients”. Switch to the “Unpaired” tab at the top middle of the screen.

You should see your unpaired Builder Base. If not, check if you have plugged in the power supply for the Builder Base. Now move to the three dots below “Actions” and click “Pair”.

Once your Client is paired, click the “Setup” button.

Now you can edit your Client. Give him a Name you want and also a location where you are going to use it. Hit “Save” when you finished.


Finding the I2C address

First click on the three dots below the “Actions” and click on “Debug”. If you want further information for example what the I2C address is check .

Next we click on “Scan” to get the I2C address.

A banner will pop up with the address. Note it down we will use it later.


Build the Firmware

So once the Builder Base is paired and set up, we can start building our firmware. Move to the “Firmware” tab on the left side of your Q-Server interface. Hit “+ Create New”.

You will be prompted to give your new firmware a name. We named ours “LCD”.

Once you created the new firmware, hit the “+ Add Hardware” button on the top, next to the “Actions” button.

We are going to search for a LCD. You can use the search bar or scroll down till you find it. After this, you can give it a name and then click on “Add Hardware”. We named ours “LCD”. Next we need to configure the firmware. Click on the LCD. We now need to set a Driver, which is the Generic LCD2004 Display (I2C) in our case. Now we need the I2C address which we noted down before. Type it in and as a layout we choose 2 x 16 which is the display size.

Next we have to upload the firmware file to our Builder Base. Click on the three dots below “Actions” and click on “Upload”.

Choose the correct Builder Base and hit “Upload”. You should see a progress bar pop up at the right side of your screen.


Build the App

While the firmware is uploading, we can build the application for our Button. Move to the “Apps” tab on the left side. Click on “Create New” and give it a name you want. We named ours again “LCD”. Hit “Create”.

You will find yourself on the Canvas.

For this tutorial we will need a LCD hardware object, two Button interfaces, one Input Text interface and Static string code.

Arrange and name them:

The Static String is used to send a perpared message to the LCD which will be displayed there. To initiate it it is connected to a button. Also we have a button to delete everything from the display and an Input Text interface object to type in the text we want to be displayed.

Click “Save App” on the top right. You will return to the first screen of the “Apps” tab. Now click the play button on the bar located at the right side.

Now we have to map the hardware and interface objects we have put together before to the actual hardware of the circuit. Click on the “LCD” tab and choose the Client, which is connected to the physical Button of the “LCD” system.

Once you done click “Save + Run”.


Run the App!

Click on the “Dashboard” icon in the top right corner.

Select the LCD app.

As you know press on the “Static String” the display will show “Hello!” which is the same text we safed in the Static String code object while building the app.

By typing in a word or a text in the “Input Text” the system will automatically update itself and display the typed in data.

By pressing “Clear” the display will delete the “Input Text” or the Text from the “Static String”.

This is how you connect and use an I2C LCD with the Quantum System.

Happy Making!