Iñaki Nagore
Created February 28, 2023

Capacitive Stream Deck

Capacitive touch pad used as MacroPad keyboard usefull for Streaming or Key Shortcuts, using PSoC 4100S Capsense Pionner Kit from Infineon.

22
Capacitive Stream Deck

Things used in this project

Hardware components

PSoC 4 Pioneer Kit
Cypress PSoC 4 Pioneer Kit
PSoC 4100S Capsense Pionner Kit
×1
Self made PCB
PCB created for capacitive detecition
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

PSoC Creator
Cypress PSoC Creator

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

Keypad SCH

Schematic of the KeyPad

Keypad PCB

PCB of the keypad

Image KeyPad Schematic

Image Keypad PCB

Code

Main Code

C/C++
/* ========================================
 *
 * Copyright YOUR COMPANY, THE YEAR
 * All Rights Reserved
 * UNPUBLISHED, LICENSED SOFTWARE.
 *
 * CONFIDENTIAL AND PROPRIETARY INFORMATION
 * WHICH IS THE PROPERTY OF your company.
 *
 * ========================================
*/
#include "project.h"

#include <project.h>
#include <stdlib.h>
#include "Generated_Source\PSoC4\ssd1306.h"

int main(void)  
{
    
    CyGlobalIntEnable; /* Enable global interrupts. */

    CapSense_Start();
    CapSense_InitializeAllBaselines();
    
    for(;;)
    {
        /* Do this only when a scan is done */
        if(CapSense_NOT_BUSY == CapSense_IsBusy())
        {
            /* Process all widgets */
            CapSense_ProcessAllWidgets();

            /* Scan result verification */
            /* Add any required functionality  based on scanning result */

            if (CapSense_IsWidgetActive(CapSense_BUTTON0_WDGT_ID) 
            || CapSense_IsWidgetActive(CapSense_BUTTON1_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON2_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON3_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON4_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON5_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON6_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON7_WDGT_ID)
            || CapSense_IsWidgetActive(CapSense_BUTTON8_WDGT_ID))
            {
                LED_Write(0);    // LED on
            }
            else
            {
                LED_Write(1);    // LED off
            }

            /* Start next scan */
            CapSense_ScanAllWidgets();
        }
    }
}

/* [] END OF FILE */

Credits

Iñaki Nagore

Iñaki Nagore

2 projects • 7 followers

Comments