1.9 - Find the I2C Address

Overview

For fullscreen: https://www.youtube.com/watch?v=CpmTmDQ2P5k

Today we are going to show you how to find the I2C address of an I2C device which is connected to the Quantum platform. You will need to find the I2C Address in order to build the firmware and upload it to the Builder Base.


Assemble the Circuit

We are using an I2C display but there are a bunch of different I2C devices you can connect to the Quantum system. Once your I2C devices are connected and powered on, go to your Quantum Server and do the rest of the configuration there.


Pair the Builder Base

From the home screen of your Q-Server go to Clients on the left side. Click on the “Unpaired” tab.

Connect the Builder Base, which is connected to the I2C-device, to your Q-Server. If you don’t know which client is connected to the I2C-device, simply click on the three dots below ‘Action' and then click on 'Identify’. The Builder Base should blink double green.

Now again click on the three dots below ‘Action’ of the right Client and click on “Edit”.

Name your client and also set a Location, where the client is used then it is easier for you to determine which client is which later on. Then hit “Save”.


Finding the I2C-address

Before we build our desired app and firmware, we are going to get the I2C-address. Again, click on the three dots below ‘Action’ of the client which is connected to the I2C-device. Now click on ‘Debug’.

Scroll a little bit down and you will find ‘I2C Scan’. Click on ‘Scan’. A blue bar should light up at the top of your screen telling you the address.


Build the Firmware

Now move to the firmware section. Hit ‘Create New’. Name the project ‘LCD’.

Click on ‘Add Hardware’.

You can search for LCD on your own or use the search bar in the top right of the window.

Click on the LCD and give it a name then hit ‘Add Hardware’. Now you should see that an LCD has been added. Click on the added hardware.

A bar should open up. Select the generic display as a driver.

Now the system will ask you for the I2C-address. Enter the I2C-address we found earlier.

For the layout you need to know whether your connected LCD display has a 2x16 or 4 x 20 layout. Select the right one for you and hit ‘save’.

Now upload the firmware file to your Builder Base by clicking on the three dots, and then choose “Upload”.

Select the right Client and click upload.


Build the App

Now we are going to create a demo app for the I2C-display. Head over to the app builder on the left side and click ‘create new’. We will name it “LCD”.

Now we want an ‘LCD’ hardware and an ‘Input Text’ interface object. Just use the search bar on the top left to find the objects and place them on the canvas.

Connect the ‘Text'-Port of the ‘Input Text' object to the 'Send to Display’ and 'String’ ports of the LCD object.

Click ‘save’.


Run the App!

Now click the play button on the app you created.

Select the client you are using and hit “Save + Run”.

Once the app is running, click on the dashboard icon. Go to the LCD app.

If you now type something in the text bar, the connected LCD display should show the same input message you typed in.

That’s how you find the I2C-address of a connected I2C-devices and how to use it in a project . We hope this is useful for you and happy making!