Cy8CKit guidance - Ble Hid Kb hardware configuration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AnPa_4583841
Level 1
Level 1

I have 2 things I'd greatly appreciate some direction on, however first let me state what hardware I'm working with, and my goals.

Hardware I currently have:  Cy8CKit-042-BLE-A  (*plus a ton of other Arduino boards);

The goal is to create is a, "gamepad" (*i.e. dual axis joystick w/ buttons) that is actually an Hid Keyboard over Ble;  So push one of the buttons results in some specific key (*i.e. "r"), and moving the joystick on axis x, and / or y, passed the defined dead zone, results in a continuous keypress transmission such as, "w", and, "d", until returning to said dead zone again.

1.  What I could use assistance with, the real challenge for me, and probably only reason I came across Cypress Semiconductor is configuring this over BLE;  I've already accomplished this on Arduino boards over serial.  I've spent several years now in my spare time attempting to find examples of board specific code for such a thing w/ out success. 

Note:  I had some success, however never was able to get any boards I've used coded properly to read analog input, and send a character based on the input state over BLE.  I have learned a lot over the last few years about different hardware, coding, etc, however still feel like I'm drowning.

Perhaps some guidance on configuring 1 button w/ the Cy8CKit-042-BLE-A to send a character over BLE to Windows.  Then I can move on to analog, and what I ultimately understand as the board reads the analog signal, and then converts it to a digital input (i.e. ASCII character), and transmits it over BLE to either a BLE dongle, or BLE receiver that's built into the PC... which leads me to my 2nd request for guidance:

2. I want premium hardware, speeds, latency, and interface.  (i.e.  Logitech, and the like level of wireless performance)

Over the past year or so I've been playing a fair amount of the Nintendo Switch, and also using their official, "Pro Controller".  I mention this because I have become some impressed by the speed, and ease of connecting their pro controller (*wireless, ble... from the Switch being in, "Sleep mode", and the controller being turned off).  I timed it by eye yesterday, and within 3 seconds the controller was connected, and communicating.  THAT... is what I want.  I want wireless to feel like wired, or reasonably close (*doesn't have to be Logitech's so called, "1ms" wireless... but I want to get as close as I can get.  For reference, I view the Switch Pro controller as perfect, and I imagine it has some mild latency, but perhaps less than 10ms, over Ble.

I ordered the Cypress Kit prior to investigating, but I did some research on what the Switch Pro controller uses for hardware, and it led me back to Cypress.  The Ble chip was a Cy2...something according to one user who had torn his down.  I have the information on my phone, and will update later, however thought if the Cy8Ckit is not up to the task of performing at the same level, then please guide me to the best ble chip, microprocessor, etc I need in order to replicate a similar level of performance. 

Note:  And just in case if you were curious… I am NOT attempting to design a Switch Pro controller of my own.  Rather, a native windows ble hid keyboard (*and usb) in the form of a gamepad. 

3..  Last thing... from what I gather, it appears having a peer to peer wireless connection is superior to connecting to a ble receiver connected to a PC motherboard that likely has other devices connected as well.  Therefore, my goal is to be able to do both, w/ the idea that using a usb dongle for peer to peer wireless is superior.  (*That's true for Logitech devices in my experience.  The unifying dongle connection on my MX Anywhere 2 mouse is superior to straight Bluetooth, and I have fairly new, and high end pc hardware.  However, ultimately for users I want it to literally be as easy to connect the device on a PC as any of Logitech's devices, or as fast, and easy as the Pro Controller is on the Switch.  I'm not curious if this is because of the configuration of the receiver in the Nintendo Switch?

Thank you for your time,

Andrew

0 Likes
1 Solution
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,


Thanks for having interested in Cypress PSoC products.

1)
In PSoC Creator, you will find many code examples which would give you instructions on developing HID devices. Try to search "HID" in "Find Code Example" dialogue. Each code example contains a PDF file describing its usage and details, which would lead you through it.
pastedImage_9.png
PSoC Creator provides many pre-defined components to help you with the inputs and outputs. Look carefully into the generated source of each components, especially the header files, to learn about the functions of the API. And also, be familiar with the Components Catalog will help you get the hang of PSoC.
pastedImage_11.png
To send a character over BLE, you can use the Human Interface Device profile, or just write the ASCII code to the UUID handle of your self-defined profile. PSoC BLE provides full support and features of BLE. To understand PSoC BLE better, use the code example in "Find Code Example" dialogue. Search "BLE" for it.

Anyway, to achive your goal, you may still need other references of MCU and PSoC. So I suggest you follow the Cypress lessons published on Youtube to get you the hang of it. Search "Cypress Academy" or "PSoC 101" in Youtube.

2)
Nintendo Switch do use Cypress parts as their bluetooth chipset. But the product family belongs to WICED, not PSoC. Currently Cypress offers these two kinds of product families that both provide BLE functionalities. BTW, "Broadwell" is something related to Intel. Here I think what you really mean is "Broadcomm". You can find the news of what happened to Broadcomm and Cypress on the Internet.

And, if you need faster connection establishment, you can try "Directed Advertising", which is a feature provided by BLE itself. Seach for it or see this link for details: https://community.cypress.com/thread/4798.

3)
Bluetooth is also a kind of Peer to peer connection protocol. Different kinds of wireless protocol have their advantages and disavantages. Nintendo Switch uses Bluetooth Low Enegy technologies for their concerns.

You can surely develop both connection types and dongles based on Cypress MCU. But you may need additional chips and devices and connect other pieces to PSoC kit by SPI or UART.

----------------------

Have fun with Cypress products and you are welcome to post if you need anything in Cypress Community.

<<<<<<<<<<<<<>>>>>>>>>>>>>
Best Regards
C. L.
<<<<<<<<<<<<<>>>>>>>>>>>>>

View solution in original post

0 Likes
2 Replies
AnPa_4583841
Level 1
Level 1

---- EDIT:  I was incorrect in referencing what was said to be in the Switch Pro Controller.  It said it used a Broadwell chip for Ble, specifically BCM20734UA1 (*I haven't read anything regarding microprocessor... i.e likely arm I'm going to assume, nor what method specially over Ble it uses.  i.e. does it use SPI over ble?  I2c?  (*I read the Wiimote used i2c over ble)  etc...

Anyway I didn't get too far, but what led me back to Cypress is headlines appeared to say Cypress purchased Broadwell?  I need some guidance, am willing to buy whatever hardware is suggested, and / or read, and do what is suggested as well.

0 Likes
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,


Thanks for having interested in Cypress PSoC products.

1)
In PSoC Creator, you will find many code examples which would give you instructions on developing HID devices. Try to search "HID" in "Find Code Example" dialogue. Each code example contains a PDF file describing its usage and details, which would lead you through it.
pastedImage_9.png
PSoC Creator provides many pre-defined components to help you with the inputs and outputs. Look carefully into the generated source of each components, especially the header files, to learn about the functions of the API. And also, be familiar with the Components Catalog will help you get the hang of PSoC.
pastedImage_11.png
To send a character over BLE, you can use the Human Interface Device profile, or just write the ASCII code to the UUID handle of your self-defined profile. PSoC BLE provides full support and features of BLE. To understand PSoC BLE better, use the code example in "Find Code Example" dialogue. Search "BLE" for it.

Anyway, to achive your goal, you may still need other references of MCU and PSoC. So I suggest you follow the Cypress lessons published on Youtube to get you the hang of it. Search "Cypress Academy" or "PSoC 101" in Youtube.

2)
Nintendo Switch do use Cypress parts as their bluetooth chipset. But the product family belongs to WICED, not PSoC. Currently Cypress offers these two kinds of product families that both provide BLE functionalities. BTW, "Broadwell" is something related to Intel. Here I think what you really mean is "Broadcomm". You can find the news of what happened to Broadcomm and Cypress on the Internet.

And, if you need faster connection establishment, you can try "Directed Advertising", which is a feature provided by BLE itself. Seach for it or see this link for details: https://community.cypress.com/thread/4798.

3)
Bluetooth is also a kind of Peer to peer connection protocol. Different kinds of wireless protocol have their advantages and disavantages. Nintendo Switch uses Bluetooth Low Enegy technologies for their concerns.

You can surely develop both connection types and dongles based on Cypress MCU. But you may need additional chips and devices and connect other pieces to PSoC kit by SPI or UART.

----------------------

Have fun with Cypress products and you are welcome to post if you need anything in Cypress Community.

<<<<<<<<<<<<<>>>>>>>>>>>>>
Best Regards
C. L.
<<<<<<<<<<<<<>>>>>>>>>>>>>

0 Likes