MCPcopy Create free account
hub / github.com/cifertech/nRFBox / flash

Function flash

nRFBox_V2/neopixel.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void flash(int numberOfFlashes, const std::vector<std::string>& colors, const std::string& finalColour) {
51 if (numberOfFlashes <= 0 || colors.empty()) {
52 Serial.println("Invalid parameters for flash: Check numberOfFlashes or colors vector.");
53 return;
54 }
55
56 for (int i = 0; i < numberOfFlashes; ++i) {
57 for (const auto& color : colors) {
58 setNeoPixelColour(color);
59 delay(500);
60 }
61 }
62 setNeoPixelColour(finalColour);
63}

Callers

nothing calls this directly

Calls 1

setNeoPixelColourFunction · 0.85

Tested by

no test coverage detected