Skip to content

Instantly share code, notes, and snippets.

@luytendries
luytendries / tinycubesat.cpp
Created January 31, 2025 18:46 — forked from mohitbhoite/tinycubesat.cpp
Simple low powerLED blink pattern for the ATtiny based satellite sculpture
#include <avr/sleep.h> //Needed for sleep_mode
#include <avr/wdt.h> //Needed to enable/disable watch dog timer
void setup() {
pinMode(0, OUTPUT);// LED connected to pin 5 which is recognised as pin 0 by arduino
ADCSRA &= ~(1<<ADEN); //Disable ADC, saves ~230uA
//Power down various bits of hardware to lower power usage
set_sleep_mode(SLEEP_MODE_PWR_DOWN); //Power down everything, wake up from WDT
sleep_enable();
}