So, now that you know how the code works, it could be useful to know how it actually behaves.
Normally, it is in the mode where the brightness increases and decreases in a wave-shaped way, creating what I call a 'breathing' effect.
When the bike starts decelerating, the brake light turns on. This takes about 100-200 ms to happen from the second you start braking. The light can also be triggered by actions such as going over a speed bump. It works best on paved roads or smoother trails. It does not work very well on mountain biking trails and other rough terrains.
From the time the light was last turned on, and this can happen multiple times during a braking event, to when the breathing effect resumes, there are at least 0.4 seconds. This number can be greater than 0.4 since even when the light is on, the code is still checking to see if the bike is still decelerating and will reset the timer if it is.
As far as battery life goes, using the 500 mAh battery, you should probably get around 1.5 hours of usage from it. Because of that, you may want to consider bringing extra batteries for longer rides or attaching a larger battery under the seat using tape or velcro.
Now that you've got the light all hooked up and working, you should be ready to go riding with it. Just keep in mind that this light is much more visible to other cyclists than to drivers of cars, so you should still be careful when riding at night. Riding bikes is a lot of fun, and I hope you enjoy building and using this as much as I did.