MCPcopy Create free account
hub / github.com/FastLED/FastLED / start

Method start

examples/Chromancer/ripple.h:52–73  ·  view source on GitHub ↗

Place the Ripple in a node

Source from the content-addressed store, hash-verified

50
51 // Place the Ripple in a node
52 void start(byte n, byte d, unsigned long c, float s, unsigned long l, byte b) {
53 color = c;
54 speed = s;
55 lifespan = l;
56 behavior = b;
57
58 birthday = millis();
59 pressure = 0;
60 state = withinNode;
61
62 position[0] = n;
63 position[1] = d;
64
65 justStarted = true;
66
67 Serial.print("Ripple ");
68 Serial.print(rippleId);
69 Serial.print(" starting at node ");
70 Serial.print(position[0]);
71 Serial.print(" direction ");
72 Serial.println(position[1]);
73 }
74
75 void advance(byte ledColors[40][14][3]) {
76 unsigned long age = millis() - birthday;

Callers 4

setupFunction · 0.45
stress_test_concurrentFunction · 0.45
setupFunction · 0.45
startHttpServerFunction · 0.45

Calls 3

millisFunction · 0.50
printMethod · 0.45
printlnMethod · 0.45

Tested by 1

stress_test_concurrentFunction · 0.36