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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#02 - CapSense Slider
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 23 replies
  • Subscribers 27 subscribers
  • Views 3862 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#02 - CapSense Slider

cy.gul
cy.gul over 12 years ago

On the 2nd day of our 100 Projects in 100 Days community effort, I am posting one of the PSoC 4 Pioneer Kit's bundled example projects.

 

This is a very simple yet effective CapSenseRegistered demo that implements a 5-segment slider, like the one available on the Pioneer kit.

Moving your finger across the capacative touch slider on the board, you will observe the multicolor LEDs gradually changing color from red to green. These LEDs are driven by the PWM Component.

 

 

Project Schematic:

image

                            (Actual PSoC Creator project schematic "TopDesign.cysch")

 

image

    (CapSense Component Customizer - Implementing a Capacitive Touch Slider)



Hardware Connections (all internal to the board, no external connections required):

  • 5-segment Slider - P1[1] - P1[5]
  • Green LED - P0[2]
  • Red LED - P1[6]

 

Software Setup:

  • See steps #1 - #6 from the main post here
  • Main.C - This example project implement simple firmware in the project's main.c as shown below (already completed in the example project). The code implmented scans the CapSense slider, then updates the PWM's PulseWidth with the slider value.

image

                                      ( Project firmware - main.c )


Demo Video

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Project Files:

  • CapSense.cywrk.Archive01.zip

 

 


Attachments:
CapSense.cywrk.Archive01.zip
CapSense_Configuration.zip
  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 11 years ago +1
    good~!
Parents
  • Former Member
    Former Member over 11 years ago

    Hi Im new to any sort of embedded programming but want to give it a go and get stuck in.

    I have the PSoC 4 pioneer kit and am trying to do these tutorials.

    I have tried to do this one however keep getting stuck.

    I have wrote the source code and built it and programmed it all onto the board with no errors showing up in the creator.

    However I just have a constant yellowish light on and the slider doesnt do anything.

    Was wondering if anyone else has encountered this problem or could suggest solutions.

     

    Cheers in advance

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kyle_lopin
    kyle_lopin over 10 years ago in reply to Former Member

    I had the same problem.  I changed the "API Resolution"  in the "Widgets Config" tab of the Capsense Configuration box after i setup the linear slider and that worked for me.  The default was 100, but as the PWM goes to 255 so I was getting stuck with one light always being mostly on which gave it bright yellowish color.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • kyle_lopin
    kyle_lopin over 10 years ago in reply to Former Member

    I had the same problem.  I changed the "API Resolution"  in the "Widgets Config" tab of the Capsense Configuration box after i setup the linear slider and that worked for me.  The default was 100, but as the PWM goes to 255 so I was getting stuck with one light always being mostly on which gave it bright yellowish color.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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