Skip to content

Instantly share code, notes, and snippets.

@bradford-hamilton
Last active April 24, 2023 19:33
Show Gist options
  • Save bradford-hamilton/c52e8b3d8f384ed1eba2075fae72dede to your computer and use it in GitHub Desktop.
Save bradford-hamilton/c52e8b3d8f384ed1eba2075fae72dede to your computer and use it in GitHub Desktop.
ATtiny85 - Initial LED on
int main()
{
// Set data direction for Port B bit 0 (PB0 - pin 5) to 1 for output
DDRB |= (1 << 0);
// Set data for Port B bit 0 (PB0 - pin 5) to 1 to turn on LED
PORTB |= (1 << 0);
while (1) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment