[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-690282-105":59,"doc-detail-690282-en":130,"doc-similar-690282":149},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","low-power-proximity-capsense-code-example-infineon-psoc-4-psoc-creator-42","Low-Power Proximity CapSense Code Example - Infineon PSoC 4 - PSoC Creator 4.2","","Low-power proximity sensing and CapSense tuning are demonstrated using the PSoC Creator CapSense Component with PSoC 4. The proximity raw count from the CapSense component is read by the device and used to control an LED via PWM: the LED brightens when an object is near and dims when it is farther. Two scanning modes are implemented—fast scanning for active detection and deep-sleep-based low scanning when inactive for about three seconds—to reduce power consumption. The example includes I2C communication to a CapSense tuner, hardware setup on the CY8CKIT-042-BLE-A kit, and a state machine managing scan, process, and sleep behavior.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/low-power-proximity-capsense-code-example-infineon-psoc-4-psoc-creator-42/690282/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/low-power-proximity-capsense-code-example-infineon-psoc-4-psoc-creator-42/690282.png","ImageObject",300,407,{"name":92,"@type":93},"Well Done","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-11-08",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What does the code example demonstrate on PSoC 4?","Question",{"text":112,"@type":113},"It demonstrates a low-power proximity sensor and CapSense tuner using the PSoC Creator CapSense Component. Proximity data is read and mapped to LED brightness via PWM.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How do the fast scan and low scan modes differ?",{"text":117,"@type":113},"Fast scan scans about 200 times per second, while low scan uses deep sleep and scans only about 3 times per second. The device switches between modes based on whether the CapSense widget is active.",{"name":119,"@type":110,"acceptedAnswer":120},"How is the CapSense raw count used in the design?",{"text":121,"@type":113},"CapSense uses capacitive sensing to produce a raw count value. The code transfers scan data via I2C to the CapSense tuner, graphs raw counts in real time, and scales the proximity value to the PWM period to drive the LED.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},690282,1794161398,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":44,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":143,"preview_page_count":8,"preview_urls":144},5909892210082,"https://ap-avatar.wpscdn.com/avatar/56001069da27c9f41e8?x-image-process=image/resize,m_fixed,w_180,h_180&k=1789614185077863061","Please note that Cypress is an Infineon Technologies Company.  \nThe document following this cover page is marked as “Cypress” document as this is the company that originally developed the product. Please note that Infineon will continue to offer the product to new and existing customers as part ofthe Infineon product portfolio.  \nContinuity of document content  \nThe fact that Infineon offers the following product as part of the Infineon product portfolio does not lead to any changes to this document. Future revisions will occur when appropriate, and any changes will be set out on the document history page.  \nContinuity of ordering part numbers  \nInfineon continues to support existing part numbers. Please continue to use the  \nordering part numbers listed in the datasheet for ordering.  \n[www.infineon.com](www.infineon.com)  \nObjective  \nThis code example demonstrates a low-power proximity sensor and CapSense® tuner using the PSoC Creator™ CapSense Component with PSoC® 4.  \nRequirements  \nTool: PSoC Creator 4.2  \nProgramming Language: C (Arm® GCC 5.4.1)  \nAssociated Parts: All PSoC 4 family devices that have Serial Communication Blocks and CapSense capabilities  \nRelated Hardware: CY8CKIT-042-BLE-A Bluetooth® Low Energy 4.2 Compliant Pioneer Kit  \nOverview  \nThis code example contains a PSoC Creator project that shows how to use a proximity sensor with low power. The proximity sensor is part of the CapSense Component within PSoC Creator. The proximity value is read by the device and is then used to control an LED. As you move closer to the proximity sensor, a red LED gets brighter; as you move farther away the LED gets dimmer. The code example includes two scanning modes, a fast scan mode that scans 200 times a second and a low scan mode that puts the device into deep sleep and only scans 3 times a second. When in slow scan mode, the device saves power by switching in and out of deep sleep. If the sensor is active (an object is within range), then the device switches to fast scanning mode. If the sensor is inactive (no object is within range) for three seconds, then the device switches into slow scanning mode and goes into Deep Sleep while waiting for the next scan.  \nHardware Setup  \n1. Create a loop with one of the wire jumpers found in the PSoC kit and attach to pin P2[0] as seen in Figure 1.  \nFigure 1. Wire loop for Proximity Detection (Pioneer kit 042-BLE-A example)  \nSoftware Setup  \nThere is no software setup  \nOperation  \n1. Plug the CY8CKIT-042-BLE-A kit board into your computer’s USB port.  \n2. Build the project and program it into the PSoC 4 device. Choose Debug > Program. For more information on device programming, see PSoC Creator Help.  \n3. Move a hand slowly closer to the wire loop and confirm that the LED grows brighter.  \n4. Move a hand slowly away from the wire loop and confirm that the LED gets dimmer.  \n5. Right-click the CapSense Component and select Launch Tuner. Click Connect , select I2C, and then click Start. Ensure that the data rate is set to 100kHz. Go to the Graph View tab. Confirm that as you move closer to the sensor the raw count increases, and as you move away from the sensor the raw count decreases. For more information, check the CapSense datasheet under Related Documents.  \nDesign and Implementation  \nThe CapSense Component uses capacitive sensing to return a raw count value. The raw count can be used to determine how close something is to the sensor. In this code example the raw count is sent to the CapSense tuner by I2C and graphed in realtime. The closer something is to the sensor the higher the raw count, the farther something is from the sensor the lower the raw count. The raw count is also mapped to a PWM controlling an LED. As something moves closer the LED grows brighter. As something moves farther away the LED grows dimmer. This can be seen in the flowchart in Figure 2.  \nCapSense Proximity  \nIn the CE210489_Low_Power_CapSense_Proximity code example, the following functions are perf","cbCail8BRnA5TXA0","https://ap.wps.com/l/cbCail8BRnA5TXA0","pdf",574993,"English","# Objective\n# Requirements\n# Overview\n# Hardware Setup\n# Software Setup\n# Operation\n# Design and Implementation\n## CapSense Proximity","[{\"question\":\"What does the code example demonstrate on PSoC 4?\",\"answer\":\"It demonstrates a low-power proximity sensor and CapSense tuner using the PSoC Creator CapSense Component. Proximity data is read and mapped to LED brightness via PWM.\"},{\"question\":\"How do the fast scan and low scan modes differ?\",\"answer\":\"Fast scan scans about 200 times per second, while low scan uses deep sleep and scans only about 3 times per second. The device switches between modes based on whether the CapSense widget is active.\"},{\"question\":\"How is the CapSense raw count used in the design?\",\"answer\":\"CapSense uses capacitive sensing to produce a raw count value. The code transfers scan data via I2C to the CapSense tuner, graphs raw counts in real time, and scales the proximity value to the PWM period to drive the LED.\"}]","Low-Power Proximity CapSense Code Example - Infineon PSoC 4 - PSoC Creator 4.2 | PDF",23,[145],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/79b4d44e88ecdf8d02128718dabb8b8f.webp",983,1272,{"list":150,"token":66},[151,157,163,169,175,181,187,193,199,205],{"doc_id":152,"doc_title":153,"file_type":137,"home_preview_img_url":154,"slug":155,"view_count":24,"category_name":30,"create_tm":156},700149,"CY8C40xx PSoC™ 4000S MCU - General description and Features","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012013366/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=pYz9rG0CpvvuJqIEIdgU%2FpyxBe0%3D","cy8c40xx-psoc-4000s-mcu-general-description-and-features",1794516209,{"doc_id":158,"doc_title":159,"file_type":137,"home_preview_img_url":160,"slug":161,"view_count":19,"category_name":30,"create_tm":162},690280,"CY8CKIT-042 - PSoC 4 Pioneer Kit Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002614429/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=wOqV6PHSUWm0J8ZuGBSHbCB4zQc%3D","cy8ckit-042-psoc-4-pioneer-kit-guide",1794161392,{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":81,"category_name":30,"create_tm":168},700349,"CY8CKIT-031 PSoC® CapSense® Expansion Board Kit Guide - Doc. # 001-66474 Rev. H","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011565218/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=Il2afoQ66DtllPUg5Hqv15rHwEo%3D","cy8ckit-031-psoc-capsense-expansion-board-kit-guide-doc-001-66474-rev-h",1794518375,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":34,"category_name":30,"create_tm":174},691508,"PSoC® 5LP Prototyping Kit Guide - Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002048627/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=cZJOd16hnbWfUUef35nxG5BCBjM%3D","psoc-5lp-prototyping-kit-guide-guide",1794174792,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":24,"category_name":30,"create_tm":180},692064,"PSoC® 4100S Plus Prototyping Kit Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002893571/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=Zg2a6ADptoa%2B6yCu4x5CqpIHuUM%3D","psoc-4100s-plus-prototyping-kit-guide",1794178074,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":19,"category_name":30,"create_tm":186},700158,"Cypress PSoC 4 Microcontrollers - Your Problem-Solver on Chip - Differentiation Dilemma","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012013507/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=NfYCusyNTvUbej%2BXCwQGSSoBtwE%3D","cypress-psoc-4-microcontrollers-your-problem-solver-on-chip-differentiation-dilemma",1794516276,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":19,"category_name":30,"create_tm":192},700378,"Getting started with PSoC™ 63 MCU & Bluetooth® LE on ModusToolbox™","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012024936/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=jD%2BWaJ2cjoFGwbRTpttgHIeliRw%3D","getting-started-with-psoc-63-mcu-bluetooth-le-on-modustoolbox",1794518470,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":19,"category_name":30,"create_tm":198},692061,"PSoC 4 System Reference Guide - cy_boot Component v5.20 - Document","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002058459/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=fBH%2B82sKBj8BiNdnNBIOatY9lXs%3D","psoc-4-system-reference-guide-cy_boot-component-v520-document",1794178071,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":39,"category_name":30,"create_tm":204},700151,"Automotive PSOC™ 4 - PSOC™ 4000S family - Datasheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011562470/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=dUMncRSlYjZ8Sh4buqGGuZQO0TU%3D","automotive-psoc-4-psoc-4000s-family-datasheet",1794516211,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":19,"category_name":30,"create_tm":210},700351,"PSoC® Creator™ Release Notes - Version 3.0 - Update Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011565220/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111459&Signature=fiJzqpt8vyzU4K2HzaRzKAtgsQU%3D","psoc-creator-release-notes-version-30-update-guide",1794518376]