Skip to content

Instantly share code, notes, and snippets.

@JeffersGlass
Created July 19, 2020 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffersGlass/4bfe3386a4296776ff01405bd725a302 to your computer and use it in GitHub Desktop.
Save JeffersGlass/4bfe3386a4296776ff01405bd725a302 to your computer and use it in GitHub Desktop.
void setup() {
// put your setup code here, to run once:
//TCCR1A = B00000000; //Normal Mode, no automatic pin toggling
//TCCR1B = _BV(CS12) | _BV(CS10); //Set up x1024 prescaler
TIMSK1 |= _BV(TOIE1);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
}
ISR(TIMER1_OVF_vect){
Serial.println(millis());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment