To load the sensing program on the Infineon board,
- Use Eclipse IDE for ModusToolbox.
- Bottom left panel, Start > New Application.
- Wait for the window to load.
- PSoC™️ 6 BSPs > CY8CPROTO-062-4343W. Click "Next >."
- Wait for the list of templates to load.
- Sensing > CAPSENSE Buttons and Slider. You can call it whatever you want; it'll create a folder with that name in the Application(s) Root Path specified at the top of the Select Application window. By default, the name is
CAPSENSE_Buttons_and_Slider
. - Click "Create."
- This copies the example project this project is based on.
- Replace the
deps
andsource
folders with thedeps
andsrc
folders in this repository. - Select the name (e.g.
CAPSENSE_Buttons_and_Slider
) in the Project Explorer in the left panel. - Ensure that the Infineon board is plugged into your computer.
- In the bottom left panel, click on Launches > CAPSENSE_Buttons_and_Slider Program (KitProg3_MiniProg4).
- The red LED should turn on on the board.
To see the terminal,
- Open Device Manager and look in Ports (COM & LPT).
- Find KitProg3 USB-UART (COMn). Note the COM number (eg COM7).
- Use PuTTY.
- Select Connection type: Serial.
- Set Serial line to the COM number.
- Set Speed to 115200.
- Click "Open."
The board partakes as a SPI employee. It offers 12-bit data packets in 32-bit words:
data[11:3] // slider_pos (9 bits), position of finger between 0 (left) and 300 (right)
data[2] // slider_touch_status, whether there's a finger on the slider
data[1] // button1_status, whether the right button is pressed
data[0] // button0_status, whether the left button is pressed
I'm not sure if it works though.