void sleep(int s)
Welcome in the forum, Mop.
/* No work has to be done in main loop */
Take that comment literally! What you are doing is to change the PrISM parameters at a frequency which you cannot observe with the naked eye. Your first sleep() just needs less than 1µs to return. Better (easier, but more complex) would be to use a timer that changes every second your PrISM. To have something you can rely on use CyDelay(number of ms) description in "System Reference Guide"
It is always easier for us when you 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. And do not forget to mention which kit you actually use.
In FindMe Profile example code,I added two PrISM in schematic.
But I found that StackEventHandler() executed following on startup:
/* Start BLE advertisement for 30 seconds and update link
* status on LEDs */
alertLevel = NO_ALERT;
After this, the RGB LED will always turn on all the pulse density value (0), so that RGB LED is always WHITE!
And I can't to control it with new pulse density value, it seems blocks by something...
How could I to handle this? Thanks a lot!
OK, I upload my combined project, just let RGB LED control by IAS
The first problem was solved, I remove the Time ISR,so I just coding in while loop, please to check out the FindMe project,I use PSOC BLE kit
Thanks a lot!
BLE_FindMe01.cydsn_.zip 4.1 MB