element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
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
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: zst123
  • Date Created: 30 Sep 2021 3:47 AM Date Created
  • Views 849 views
  • Likes 1 like
  • Comments 2 comments
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)

image

 

As of writing, it is ModusToolbox version 2.3

image

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

 

image

 

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

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

image

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

image

 

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 Moreimage

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.

image

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

imageimage

 

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

image

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

image

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

image

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

image

 

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

image

 

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

 

image

 

With this, we can connect to the device.

image

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

image

 

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

image

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

image

 

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

 

image

 

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

  • Sign in to reply
  • zst123
    zst123 over 3 years ago in reply to embeddedguy

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

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • embeddedguy
    embeddedguy over 3 years 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
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube