I finally understand how that will work with a "rollover"! I looked back at some old projects and Ive used it before but never understood why it works.
Unsigned will rollover backwards instead of negatively. So lets say the rollover is 600 just to make it easy...
unsigned int last = 595;
unsigned int current = 25;
current - last = 30 not -570!!
so 5 past before rollover(at 600) and 25 since rollover = 30 total. Because of the way unsigned works. 25-595 gets to zero at 570 so then count backwards from rollover(600) or (600-570) and get 30.
Hope that mess above can help others understand how they work.
This is the code I used.
if(millis() - previousMillis ) >= interval) // If time to send
bitWrite(bytetosend, 0, digitalRead(11)); // Read pin 11 and set 0 bit of byte to send.
Serial.write(bytetosend); // Send byte
previousMillis = millis(); // Set sent time