Could I ask for a sample code that using keyfob's button to control usb dongle's LED on & off?
I have no idea how to start with cc2540.
I'm a Taiwanese beginner.
thanks.
Hi Weng Jine He :)
No problem, nobody is born with programming skills.
Let's try to introduce you in the world. First, download the BLE Stack. There are LOTS of codes there!
http://www.ti.com/tool/ble-stack
To understand what you are doing, you should first read the software developer's guide, since you wanna be one of them :)
http://www.ti.com/lit/ug/swru271b/swru271b.pdf
The LED thing you wanna do can be easily done by opening the Keyfob or SimpleBLEPeripheral project (one of both) into IAR (the development environment). The projects are separated in multiple "layers" so people not interested in hardware, for example, do not have to deal with it :)
Why don't you take a look to the file "hal_key.c" and try to identify the place where a button is detected to be pressed? Then, a simple line of code will do what you want.
Go for it. And good luck! And go back with all the questions which arise.
Please click the Verify Answer button on a post if it answers your question! :)
Thanks for your suggest, Kazola.I will try what you say.But, I think I will have a lot of questions on it in the future.
This is way this forum exists :)