How would I make the breathing led like particle?

I tried to make the LED breathing like what is in the photon firmware, I am looking at the firmware source code, but still in the beginning phase of understanding the code.
there is function called as LED_Signaling_Override in the spark_utilites.cpp, I wonder is it the function to make led breathing.

If you are replicating the led you can try this:

Thanks, I read the post, it looks like to use an external RGB LED as a system RGB LED, does it mean the external RGB LED acting the behaviour like the system RGB LED defined by the firmware.

I would like to implement an RGB LED like the one that’s onboard the Photon, this RGB LED could be controlled manually by me, not defined by the firmware. Breathing is one function I like to implement.

You could try this to create a more ‘natural’ breathing cycle. Also, if you simply go through 0->255->0 it will appear to be somewhat breathing due to the logarithmic way the human eye sees. Give that a try, and see if you like it, it might just be the easiest way.

In the longer term, the LED management on the Core/Photon will undergo some changes to better co-ordinate sharing the LED between the system and the application. As part of this change, we will add some different LED patterns, such as fading, ramping, blinking etc… that the application code can use.


Thanks, @Moors7, this is very perfect.

@mdma any idea on the timeframe of these function like fading and ramping?

@mdma, @Moors7, @helxsz, for now while it is not implemented yet in firmware, users can take control of the breathing behaviour of the RGB with this library I created:

also mentioned in this topic: Led Breathe library: User control breathe behaviour for the RGB led on Particle devices

Hope this might help a few people while the guys @particle implement this breathing behavior in their firmware