BurningWreck

Updated loop for CD77_Police_Lights

Oct 12th, 2021 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void loop() {
  2.  
  3. // button management section
  4. myBtn.read(); // read the button
  5. if (myBtn.wasReleased()) // if the button was released, change the landingmode
  6. {
  7. landingMode++;
  8. if (landingMode > NUM_MODES) { // Handle overflow of modes
  9. landingMode = 0;
  10. }
  11. }
  12. switch (landingMode) {
  13. case 0: cd77_police_lights_one_modified_n_dots(2, 4, 60, CRGB::Red); break;
  14. case 1: cd77_police_lights_one_modified_n_dots(2, 4, 60, CRGB::Blue); break;
  15. }
  16. }
Add Comment
Please, Sign In to add comment