Open setiupyguppie opened 8 years ago
All of the LEDS are wire to pins that are able to do PWM, so you can set the output using "analogWrite()".
Right now the part of the main loop that deals with the LEDS is:
void loop() {
if (justWokeUp) {
digitalWrite(frontRightPin, HIGH);
digitalWrite(frontLeftPin, HIGH);
digitalWrite(frontCenterPin, HIGH);
digitalWrite(topBulbPin, HIGH);
justWokeUp = false;
}
This basically says "if you just turned on the portal gun, set all outputs to a 5V output". If you wanted to modulate the LED, you'd modify that part of the code to set a specific PWM value from 0-255, rather than always "HIGH" (Which is just another way of writing "255".
More excellent support and guidance! Thank you! I'll keep you posted on my progress.
I'd like to make the main (middle) LED flicker, to simulate the effect seen in the show. Is there a quick-and-dirty way of doing this with your existing code?
SHOW ME WHAT YOU GOT!
:)