Skip navigation
Home > All Places > Topics > Cypress Community Blogs > ModusToolbox Blog > Blog > 2020 > May > 06

Overview

 

This project demonstrates using Cypress PSoC 4 AFE Shield with CYW920819EVB-02 Kit, to collect data from different sensors present on the shield board and send it over Bluetooth using a custom GATT service to the peer device.

screen1.jpg

Project Technology Focuses

  • CYW20819 MCU
  • Sensors
  • BLE

Project Requirements

Hardware

Software

 

Project Description

The objective of this project is to read the values from sensors on PSoC 4 AFE shield board and send it to peer BLE GATT Client using GATT notifications.

 

AFE shield board has temperature sensor, humidity sensor, ambient light sensor, CapSense, push buttons, potentiometer and an OLED display. PSoC 4 on AFE Shield processes the data from all the components mentioned above. The values are stored in PSoC 4 registers. Refer the AFE Shield kit guide for more information. CYW20819 reads data from AFE shield through I2C. A custom GATT server is configured on CYW20819 to frame the sensor data as shown below.

 

GATT notification data format

Byte (0 -3)

Byte (4 -7)

Byte (8 -11)

Byte (12 -15)

Byte 16

Byte 17

Byte 18

Byte 19

Temperature

Humidity

Ambient

Pot value

CapSense

Switch

Proximity

RFU

 

Once the peer device subscribes for notifications, the sensor data is sent using GATT notification for every 500 milliseconds. Also, the data is displayed on the OLED and UART terminal console.

 

afe_demo_out2.jpg

 

Running the Demo

Download the project files attached with this post (ccm02_source.zip) and import into Eclipse IDE for ModusToolbox. Refer the user guide for importing existing projects into Eclipse IDE for ModusToolbox Flash the firmware and pair the board with CySmart windows/android/iOS application. Go to GATT DB and enable the notification in the app to see all the sensor values.

 

screen2.jpg

Filter Blog

By date:
By tag: