colorLeds[i].pulse()

Category:Circuit Playground

Makes the colorLed(s) pulse at a specific time interval.

While similar to .blink(), the .pulse() method turns the colorLed(s) on and then slowly dims the light until the colorLed(s) turns off again. So when the light is pulsing, it's not just turning on and off, it's lowering its brightness.

Syntax

colorLeds[i].pulse(interval);

Parameters

Name Type Required? Description
interval number The length of time (in milliseconds) that the light should be dimming for.

Found a bug in the documentation? Let us know at documentation@code.org