If you're just going to have the LED ON all the time you can remove the Pro Trinket and just wire the LED directly to the battery through a switch, but we wanted to have the option to add more functionality later.

You can keep the Pro Trinket if you want to have the output PWM'd for lower brightness, or blink for alerts.

The code for this is extremely straightfoward.

Download: file
/*
  Tent Lantern project by Timothy Reese
  https://www.learn.adafruit.com/tent-lantern
 */



void setup() {
  // initialize digital pin 12 as the output
  pinMode(12, OUTPUT);
}

void loop() {
  digitalWrite(12, HIGH);  //turn the LED Modules on
}

This guide was first published on Nov 09, 2016. It was last updated on Nov 09, 2016.

This page (Code) was last updated on May 16, 2020.

Text editor powered by tinymce.