Details about this contest is at Connected Cloud Challenge with Cypress and AWS IoT and it contains useful information and technical resources link.

for convenience, i also copy and paste some of these urls at the references section of this blog

It is a hot sunny day and under MCO, i find some time to learn about the kit.

 

Software Installation

Modus can be installed from https://www.cypress.com/products/modustoolbox-software-environment

It has packaged solution to connect to

  • Arm Pelion Cloud Management and Mbed OS
  • Amazon Web Services (AWS) IoT and FreeRTOS SDK
  • Cypress AnyCloud IoT

I am using AWS in this case.

 

i downloaded IDE  2.1 and during installation i change the default installation directory to e:

as my c drive is becoming crowded.

Modus names itself with short name mtw. its default workspace name is one with mtw, that i follow.

 

Unboxing and Running Pre-programmed Demo

The kit comes with a handy and useful printed quick start guide. It contains a pre programmed code example

However, it is using Cypress WICED Studio, which contains its own WICED api and SDK. I think my development mostly will skip that as it seems lacking example with Amazon AWS.

 

i did a firmware update with the modus IDE installed firmware loader. Latest firmware is at here though i only use the version that comes with Modus IDE

 

Development with Modus IDE

Firstly, i read through hardware user guide,

Hardware:

then i follow one of the example https://github.com/cypresssemiconductorco/afr-example-weather-station.

The downside is that it is using a shield that i don't have https://www.cypress.com/file/428471/download  but it still makes  a good reference

in the example, PSoC 6 WiFi-BT pioneer kit communicates to the sensors via I2C and i want to do

similar connectivity. In addition, it shows connectivity to OLED display

 

TFT Display Shield Board CY8CKIT-028-TFT

Documentation : https://www.cypress.com/documentation/development-kitsboards/tft-display-shield-board-cy8ckit-028-tft

this is the shield that comes with the pioneer kit. It has its own example at this url

 

Amazon FreeRTOS

clone it with this release

https://github.com/cypresssemiconductorco/amazon-freertos/releases/tag/201910-MTBAFR1951

eg. git clone --recurse-submodules https://github.com/cypresssemiconductorco/amazon-freertos.git --branch 201910-MTBAFR1951

what does 'detached head' state means? >>> look at this https://www.git-tower.com/learn/git/faq/detached-head-when-checkout-commit

 

we then need to set permission on Amazon, and adding these two permissions to the user

ignore the instruction on AWS documentation that we can follow the Quick Connect workflow in the FreeRTOS consolehttps://console.aws.amazon.com/freertos to quickly connect your board to the AWS Cloud.

we will only use the FreeRTOS provided by Cypress

we use https://docs.aws.amazon.com/freertos/latest/userguide/get-started-freertos-thing.html  to register our board

(note: as part of this, we need the aws cli, https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html )

i copy this figure from https://docs.aws.amazon.com/iot/latest/developerguide/create-device-certificate.html

but i only downloaded the certificate, the public and private key. i not successful download the root CA for AWS IoT

however, i find myself without the need to use the root CA for AWS IoT

 

after registration, remember to edit the aws_clientcredential.keys.h files following this instruction

here is screenshot how to set the key

where we set the endpoint  ,the thing , the wifi credential as well as connection type

 

Special Note on my machine: i do encounter a build error on Modus as it can't find some tool at its default c drive. i got to manually fix it by pointing to my install directory

in the makefile

also, start.mk has to be modified as it cannot handle white spaces

 

Then, we build and download the code, by clicking aws_demos Program (KitProg3) in the quick panel

Figure sreenshot during programming

 

Figure screenshot after programming.

 

from here we can click the resume button on toolbar, and on putty terminal we will see its response

 

 

References

Connected Cloud Challenge with Cypress and AWS IoT  - contest page

 

Remember that we have technical community forums for each where you can get help from Cypress applications engineers – please see below!

Mbed OS SDK Resources: Arm Mbed OS is a free, open-source embedded operating system designed specifically for the "things" in the Internet of Things. It includes all the features you need to develop a connected product based on an Arm Cortex-M microcontroller, including security, connectivity, an RTOS, and drivers for sensors and I/O devices. Resources for Cypress’ Mbed OS SDK are below:

AmazonFreeRTOS SDK Resources: Amazon FreeRTOS is an open source operating system that extends the popular FreeRTOS kernel with software libraries that make it easy to connect IoT devices to AWS cloud services like AWS IoT Core. Resources for Cypress’ Amazon FreeRTOS SDK are below:

AWS IoT Resources

 

getting started with Amazon freertos

https://community.cypress.com/docs/DOC-18348