3 Replies Latest reply on Mar 16, 2018 8:59 AM by e.pratt_1639216

    I need Help for very simple BLE


      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

        • 1. Re: I need Help for very simple BLE

          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  .




          • 2. Re: I need Help for very simple BLE

            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


            • 3. Re: I need Help for very simple BLE

              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.