NoSloppy

Red Green Arrows

Jan 25th, 2021 (edited)
820
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. // Custom defined struct for accent LEDS
  2.  
  3. struct AccentsLED {
  4. static constexpr float MaxAmps = 0.02;
  5. static constexpr float MaxVolts = 3.2;
  6. static constexpr float P2Amps = 0.006;
  7. static constexpr float P2Volts = 3.0;
  8. static constexpr float R = 0; // Resistor value
  9. static const int Red = 255;
  10. static const int Green = 255;
  11. static const int Blue = 255;
  12. };
  13.  
  14. BladeConfig blades[] = {
  15. { 0,
  16. // Main Blade
  17. WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ,
  18. // Red arrow
  19. SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),
  20. // Green Arrow
  21. SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(),
  22. CONFIGARRAY(presets) },
  23. };
  24.  
  25.  
  26. // -----------------------------------------------------
  27. // | Blade styles for accent LEDs for Control Box Arrows |
  28. // -----------------------------------------------------
  29. // Arrow blade styles for "cave scene" blinking patterns, with optional red arrow behavior commented out:
  30.  
  31. // When saber is off, Green blink 9 times (18 bits) then is off for 6 blinks (12 bits)
  32. // When saber is on, Green stays lit
  33. // When saber is off, Red remains off for 9 blinks (18 bits) then is on for 6 blinks (12 bits)
  34. // When saber is on, Red //turns off//Blinks//pulse depending on which you have uncommented.
  35.  
  36. // Red Arrow Pulses when blade is ON
  37. // StylePtr<InOutHelper<Pulsing<Black,White,3000>, 1, 1, Sequence<White, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
  38. // Red Arrow is OFF when blade is ON
  39. // StylePtr<InOutHelper<Black, 1, 1, Sequence<White, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
  40. // Red Arrow Blinks when blade is ON
  41. StylePtr<InOutHelper<Blinking<Black,Rgb<130,130,130>,1500,500>, 1, 1, Sequence<Rgb<130,130,130>, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
  42. // Green Arrow
  43. StylePtr<InOutHelper<Rgb<85,85,85>, 1, 1, Sequence<Rgb<85,85,85>, Black, 200, 30, 0b1010101010101010,0b1000000000000000>>>(),
Add Comment
Please, Sign In to add comment