I need Help for very simple BLE

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

cross mob
yvAc_1556866
Level 2
Level 2
First like received

Hello
I have been doing electronics since 1968 but BLE only for 1 month.
I have a very simple project with two modules (each equipped with a CYBL10162-56LQXI) that I have to make in 15 days!
A push button on one module, a relays on the other module.
If the button is ON the relay must be ON
If the button is OFF the relay must be OFF
I use PSOC4 V4.2
Thank you
Yves

0 Likes
1 Solution
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello ,

There are so many Code examples available with PSoC Creator. You can refer to the code examples and create your own project. You can also refer to AN91162 - Creating a BLE Custom Profile  .

Thanks,

Hima

View solution in original post

0 Likes
3 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello ,

There are so many Code examples available with PSoC Creator. You can refer to the code examples and create your own project. You can also refer to AN91162 - Creating a BLE Custom Profile  .

Thanks,

Hima

0 Likes

Hello
Thank you for that answer, but it's not the help I'm waiting for.
I am already studying Cypress documents !
And if I was already able to create my application, I would not have asked for help.

Best regards

Yves

0 Likes
Anonymous
Not applicable

Set one of the devices as central, one as peripheral

Set up the peripheral to advertise when it turns on

Set up the central to scan when it turns on

If the central finds the peripheral, have it connect to it

Depending on your application you can have the button/relay be on whichever you choose, but it changes the code flow either way.

Assuming you put the button on the central, and the relay on the peripheral:

Have the central send a write to the periphal for a custom characteristic that holds the "state value" for the relay based on what the button's state is.

On first connecting to the peripheral have the central write the button state to ensure the relay is set as desired

Whenever the peripheral receives the write event, check the relay state and have it match the button state.

Use a confirmed/reliable write if you need guaranteed operation

Without writing the program for you, you need to ask specific questions about where you are stuck rather than panicking and asking for someone to give you the whole project.

This example: Project #003: BLE Custom Profile - CapSense and RGB LED

Has the peripheral already setup more or less how you want it, meaning you can just modify it to work for your case, and then just implement the central device to work with it.

0 Likes