How do you connect PSoC 4 Creator BLE Connections with Android Device?

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

HI


I am a student studying psoc and app inventory.

I am attempting to control an LED through an Android device by the software of App Inventor 2. The LED is part of the PSoC 4 micro-controller, which I will use the software of PSoC Creator 4

How do I make it work when I have to concatenate the psoc4 service and characteristics with the UUID?

I will ask for your help. I have included an easy-to-understand attachment.

0 Likes
1 Solution
Anonymous
Not applicable

This example project does exactly what you are looking to do: http://www.cypress.com/blog/problem-solver/project-034-rgb-led-control-over-bluetooth-low-energy

Try dissecting it for information on the specific details on implementation that you need.

Referring to your PSoC 4 main() code, you will need to have a callback function to handle BLE events, CyBleProcessEvents() called consistently in main loop, and a flag that gets set/cleared to indicated the LED setting in the callback handler based on the events. The BLE events are very involved, but if you right-click the BLE component and select "Open Datasheet" or "Open API Documentation", then you will be able to look at what functions do/can be called.

View solution in original post

0 Likes
2 Replies
AlanH_86
Employee
Employee
100 replies posted 50 replies posted 25 solutions authored

I had not seen AppInventor... that looks pretty cool.

From what I can tell from the screens.

When you press button 6 or button 7 it will write to some service/characteristic UUID

In order to do this you will need to create a custom service and characteristic in the P4BLE that matches the UUIDs in the app inventor.

You can watch videos on doing that in the http://www.cypress.com/video-tutorials

0 Likes
Anonymous
Not applicable

This example project does exactly what you are looking to do: http://www.cypress.com/blog/problem-solver/project-034-rgb-led-control-over-bluetooth-low-energy

Try dissecting it for information on the specific details on implementation that you need.

Referring to your PSoC 4 main() code, you will need to have a callback function to handle BLE events, CyBleProcessEvents() called consistently in main loop, and a flag that gets set/cleared to indicated the LED setting in the callback handler based on the events. The BLE events are very involved, but if you right-click the BLE component and select "Open Datasheet" or "Open API Documentation", then you will be able to look at what functions do/can be called.

0 Likes