You need to translate the code from Arduino to PSoC. For example, arduino code uses "Wire.h" which is a library for implementing I2C communication. In Modus, you need to configure a Serial Communication Block (SCB) as I2C in the device configurator and write code using the APIs in the Peripheral Driver Library (PDL).
In the code for processing, the code reads the characters that comes in through the UART. So configure another SCB5 as UART and write code to read the RX buffer whenever it is non empty.
To help you get started with the PDL APIs for different blocks, we have code examples written which you can refer: GitHub - cypresssemiconductorco/Code-Examples-for-the-ModusToolbox-PSoC-6-SDK: This repository contains ModusToolbox cod…