How do I find an angle from its tangent?

Cool. And all the the other modules are here:

https://www.nongnu.org/avr-libc/user-manual/modules.html

I didn't know there was a time_t in AVR:

#include <time.h>  // https://www.nongnu.org/avr-libc/user-manual/modules.html

time_t now = 0;

void setup() {
  Serial.begin(115200);
}

void loop() {
  now = millis();
  report();
}

void report(void) {
  time_t interval = 500;
  static time_t last = 0;
  if (now - last >= interval) {
    last = now; 
// or
//    while ( now - last >= interval ) {
//      last += interval; // catch up
//    }
    Serial.println(now);
  }
}

Typing #include <time.h> is better then typing unsigned long twice.

Or even once.