How can I interact with Arduino Header?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ScNi_4340706
Level 1
Level 1
First question asked

Hello,

I have an IR camera that connects to GND, SCL, and SDA Arduino headers. I tried using my Arduino code but obviously, the code is different in Modus. How would I go about reading the information that comes off of those ports in Modus? I would really appreciate any help someone could provide. Here is the link to the code and the IR camera: https://www.robotshop.com/media/files/pdf2/dfr-553-wiki.pdf Thank you In advance. Also sorry if it seems I am spamming I just don't know where to put this question.

Very Respectfully,

  Scott Nicholson

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello Scott,

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 conta...

Regards,

Dheeraj

View solution in original post

0 Likes
1 Reply
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello Scott,

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 conta...

Regards,

Dheeraj

0 Likes