I have a question that seems really simple, but I think there's something in Processing that I'm not grokking. The issue is that when I add two ints together and the final amount is > 32k, the amount becomes negative.
Seems like an overflow issue except that the Processing reference states
Datatype for integers, numbers without a decimal point. Integers can be as large as 2,147,483,647 and as low as -2,147,483,648.
Here's the offending code and the Serial Monitor output:
int start_millis = millis();
int end_millis = start_millis + 5000;
Serial.println(start_millis);
Serial.println("");
Serial.println(end_millis);
And the monitor output:
!---Motion Detected; Flicker starting ---!
17616
22616
!--- Flicker Over ---!
!---Motion Detected; Flicker starting ---!
22986
27986
!--- Flicker Over ---!
!---Motion Detected; Flicker starting ---!
29569
-30967