Application Code, TFT display, CapSense

A project log for FIMble

Concept of a plug-and-play IoT food monitoring system. It aims to reduce food wastage at consumer and distributor level

zst123zst123 06/21/2020 at 03:350 Comments

(1) Finding out how Cypress FreeRTOS Demo Code runs

I wanted to modify as little of the original files as possible. So I put my code around the demo code. This is how the code runs from the main.c until it reaches the demo code.

In main.c (aws_demos/application_code/main.c)

In iot_demo_runner.c,

In iot_demo_runner.h

In aws_demo_config.h,

(2) Modify to run my own code

I created my own app.c and app.h files with the startup function called RunMyApplication().

In aws_demo_config.h,

In iot_demo_runner.h,

(3) How to add TFT display library

I used reference from this blog post:

Right click on the project inside Project Explorer > ModusToolbox > Library Manager

Turn on these Libraries

In the Makefile, add this to COMPONENTS. To indicate we are using an OS and it is Non-TouchScreen.

In my RunMyApplication() function, I added these lines. To test the LED and the TFT display.

GUI_DispString("Hello World");

And now it looks like this

(4) How to add CapSense library

Do not add CapSense library. Leave capsense unchecked in the Library Manager. Because Cypress FreeRTOS already includes the CapSense library.

I created a new RTOS task and then initialised the CapSense using code from these examples.

One problem I faced is I cannot get the slider gesture to work (flick left / flick right). But I can get the slider position (value of 0 to 300) working perfectly.

This is a video of my progress for today. It shows the testing of CapSense, TFT display and WiFi working.