The OSOYOO Magic I/O Shield for Arduino is a powerful board for the beginners. With this Magic board, we can easily connect various sensors and actuators much easier than before.
When making Arduino projects, we often need to send text strings to an external LCD display. In this lesson we will show how program I2C communication protocol and how to send display text to LCD from OSOYOO Basic Board for Arduino by I2C protocol.
The integration of an LCD display greatly facilitates the interactivity of the project you are developing, allowing the user to directly read some output parameters. These values can be either a simple text or numerical values read by the sensors, such as temperature or pressure, or even the number of cycles that the Arduino is performing.
However, these displays have a small problem. When they are connected to a micro-controller (such as Arduino for example), these displays require virtually many connection PINs occupying practically almost all available IO and leaving the multiprocessor few outputs for any other devices and sensors. This problem has been solved thanks to the communication on the I2C bus.
The LCD1602 display has an integrated microchip that manages this type of communication, and then all of the input and output information are limited to only two PINs (excluding power supply). I2C is a type of serial bus developed by Philips, which uses two bidirectional lines, called SDA (Serial Data Line) and SCL (Serial Clock Line). Both must be connected via pulled-up resistors. The usage voltages are standard as 5V and 3.3V.
The blue potentiometer on the I2C LCD1602 is used to adjust the backlight for better display.And there is a jumper on the board, if you take away this jumper , the backlight will always be off.
For the usgage of other functions, please refer to the “LiquidCrystal_I2C.h” in the sourcecode of I2C LCD library.
First, please plug Osoyoo Magic I/O shield into UNO board:
Then connect the I2C LCD 1602 Display module to the I2C port of the Magic I/O shield (please move the switch on the board to 5V) with a 4-pin PNP cable as below:
After above operations are completed, connect the OSOYOO Basic Board for Arduino to your computer using the USB cable. The green power LED (labelled PWR) should go on.
Open the Graphical Programming software Mixly, if Mixly is not English, you should change the language first:
You can download the code directly, then click “Open” in Mixly to choose the code you download:
Or you can do as following operations:
Then right click to duplicate the blocks, and fit them:
The whole program blocks are as following:
After above operations are completed, do as follows:
A few seconds after the upload finishes, you should now see your I2C LCD1602 display the static characters: “Hello, World!”,next, the LCD will be cleared, and then the “Hello, World!” will be displayed again.
DownLoad Url osoyoo.com