element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Low Power IoT Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Low Power IoT Design Challenge
  • More
  • Cancel
Low Power IoT Design Challenge
Blog Wearable Gesture Control - #2 Install & Setup Template Application
  • Blog
  • Forum
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
Author: zst123
Date Created: 30 Sep 2021 3:47 AM
Views: 201
Likes: 0
Comments: 2
Related
Recommended

Wearable Gesture Control - #2 Install & Setup Template Application

zst123
zst123
30 Sep 2021

Table of Contents

Wearable Gesture Control - #1 Introduction

Wearable Gesture Control - #2 Install & Setup Template Application

Wearable Gesture Control - #3 Integrating LCD & Accelerometer

Wearable Gesture Control - #4 Collecting data for Edge Impulse

Wearable Gesture Control - #5 Deploying Edge Impulse model & Fixing Makefile issues

Wearable Gesture Control - #6 BLE communication with an app

Wearable Gesture Control - #7 Low Power Profiling

 

See all my posts here

 

Blog #2 Install & Setup Template Application

 

I will be showing you how I setup the Linux IDE from the official website. I will be using ModusToolbox on Ubuntu 20.04 LTS.

Download ModusToolbox (Linux)

 

As of writing, it is ModusToolbox version 2.3

It is a tar.gz file. I extracted it into a folder ModusToolbox into my home folder ~/

 

According to the readme file, I need to run the following installation commands as follows:

 

~/ModusToolbox/tools_2.3/openocd/udev_rules/install_rules.sh

~/ModusToolbox/tools_2.3/driver_media/install_rules.sh

~/ModusToolbox/tools_2.3/fw-loader/udev_rules/install_rules.sh

~/ModusToolbox/tools_2.3/modus-shell/postinstall

sudo apt-get install libusb-0.1-4

 

 

Go into the directory and start ModusToolbox by double clicking on this file

  • ~/ModusToolbox/ide_2.3/eclipse/ModusToolbox

The app will launch and I am greeted by this screen. From Quick Panel, choose New Application.

 

I got the PSoCRegistered 6 WiFi-BT Pioneer Kit so I chose CY8CKIT-062-WiFi-BT.

Cypress PSoC 6 WiFi-BT Pioneer Kit Specs and More

Based on my proposal, I decided to choose the AnyCloud BLE CapSense Buttons and Slider template as it covers the main code of what I need (BLE and CapSense). I will add on relevant libraries along the way.

After creating the project, you will see it in the Project Explorer. Right click it to rename it to our own name

 

Program the board. At the bottom left, you will see options in the Quick Panel. Choose Build and then Debug using KitProg3.

If the programming is successful, you will see build details in the console

After programming the template, launch your favorite UART serial console and details will be printed on it. It indicates the board and the bluetooth events are functional

Double click on design.cybt. This will open up the BLE configuration.

 

If you go to GATT settings, you will see a service called CapSense and it has Button and Slider characteristics under it.

 

So from reading all the settings, we get the following IDs are programmed into the board, let us verify it.

 

CapSense (Service)0003CAB5-0000-1000-8000-00805F9B0131
Button (Char)0003CAA3-0000-1000-8000-00805F9B0131
Slider (Char)0003CAA2-0000-1000-8000-00805F9B0131

 

On an Android phone, I installed this app to debug the BLE communication

  • https://play.google.com/store/apps/details?id=com.punchthrough.lightblueexplorer

 

 

With this, we can connect to the device.

Upon connecting, notice that the ID codes are the same as what we have observed.

 

To do a simple test, I renamed the device. Go to GAP Settings and change the Device name

Download the code to the board, and I see the new name on my phone!

 

This is a test of the bluetooth communication for the slider characteristic

 

 

Never thought that ModusToolbox has become so simple and seamless since I last used it one year ago! We shall revisit BLE again in a future blog.

In the next blog I will add the CY8CKIT-028-TFT display shield. The features on the shield I will use are the LCD display and the motion sensor (accelerometer)

 

I will be posting my progress on my Github repo, feel free to follow it!
https://github.com/zst123/Element14_Low-Power-IoT

Anonymous
Parents
  • Ujjval Rathod
    Ujjval Rathod 7 months ago

    Good stuff,

    As I am also using BLE in my personal project, do you know which PHY are you using? Is it enough for your throughput requirements?

    Or let me ask another way, is the BLE API smart enough to manage connection as per the requirement of throughput or it should be set in the project by the user?

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Comment
  • Ujjval Rathod
    Ujjval Rathod 7 months ago

    Good stuff,

    As I am also using BLE in my personal project, do you know which PHY are you using? Is it enough for your throughput requirements?

    Or let me ask another way, is the BLE API smart enough to manage connection as per the requirement of throughput or it should be set in the project by the user?

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Children
  • zst123
    zst123 7 months ago in reply to Ujjval Rathod

    ModusToolbox has abstracted API made it very easy for me to get started quickly. For the PHY, I did not look into the technical details and the drivers are generated with a nice abstraction layer. I am using the CY8CKIT-062-WiFi-BT kit so you may take a look there. And yes, there is a choice to allow between 1 - 4 connections from the Bluetooth Configurator.  I am very new to BLE so I may not be able to answer your questions well, I hope this helps...

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube