- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using psoc 4 ble kit.
I want to use the button on p2.7
I have defined it in the design
My queries are -
How do i access it?
What will be the values received when pressed and not pressed?
From which function do i get the output values of the button when pressed and not pressed?
Solved! Go to Solution.
- Labels:
-
BLE
- Tags:
- psoc4 ble
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer the below modified project, in which when we enable the notify in CySmart App and if the button is pressed then 1 should be notified in the cysmart app, it will print "BUTTON PRESSED" in uart and red led will glow. If not pressed red led should not glow and 0 should be notified in the cysmart app.
If we stop the notify in CySmart App then no operation will happens.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should define your input pin as "Resistive pull up" with "initial drive state" high (1)
When the switch is pressed you will read with PinName_Read() API a zero (0) value.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello sir,
I have mentioned the switch as u mentioned
I tried a project where if the button is pressed it should print "BUTTON PRESSED" in uart , red led should glow and 1 should be notified in the cysmart app
If not pressed red led should not glow and 0 should be notified in the cysmart app
Don't know where I have gone wrong
I'm attaching the project
Please go through it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please post your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer the below modified project, in which when we enable the notify in CySmart App and if the button is pressed then 1 should be notified in the cysmart app, it will print "BUTTON PRESSED" in uart and red led will glow. If not pressed red led should not glow and 0 should be notified in the cysmart app.
If we stop the notify in CySmart App then no operation will happens.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you sir
I have another doubt
The values sent 0 and 1 receive as strings or integers in the cysmart app or any another ble supported app?
Thanks,
Harshith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
In the above attached project, the values sent 0 and 1 received as integers. We can send strings of data by changing the characteristic value type in the BLE Component as shown in attached image.
Thanks,
P Yugandhar.