Skip to content

Commit

Permalink
Remove blending stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsteffler committed Jan 12, 2019
1 parent d6e8019 commit 2a95f0a
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions chairmans2019.ino
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,19 @@ void increment(int i) {
Serial.println(startTime);
Serial.print("End time: ");
Serial.println(startTime + duration);
while (millis() < startTime + duration) {
int t = millis(); // Initialize time for uniform brighness
Serial.print("Averaging LEDS. millis:");
Serial.println(millis());
for (int seg = 0; seg < nSegments; seg++) {
// set each to the blend of its original and end values with the more time
// giving more weight to the end color. The abs() is there to ensure that
// the delay in the two millis() calls above does not cause a negative
// value.
setSegment(seg, blendColors(endValues[seg], originalValues[seg], t,
abs(startTime + duration)));
}
FastLED.show();
// while (millis() < startTime + duration) {
// int t = millis(); // Initialize time for uniform brighness
Serial.print("Averaging LEDS. millis:");
Serial.println(millis());
for (int seg = 0; seg < nSegments; seg++) {
// set each to the blend of its original and end values with the more time
// giving more weight to the end color. The abs() is there to ensure that
// the delay in the two millis() calls above does not cause a negative
// value.
setSegment(seg, endValues[seg]);
}
FastLED.show();
//}
Serial.println("Duration Done");
setMotor(-speed);
Serial.print("backtranking ");
Expand Down

0 comments on commit 2a95f0a

Please sign in to comment.