UART und LED-Code auch mal rauslöschen. wenn atol eine runtime-Exception auslöst, müsste es davon unabhängig sein.
Stattdessen könntest du Zeichen aus UART auch durch const cstrings testweise ersetzen.
http://www.cplusplus.com/reference/cstdlib/atol/On success, the function returns the converted integral number as a long int value.
If no valid conversion could be performed, a zero value is returned.
If the converted value would be out of the range of representable values by a long int, it causes undefined behavior. See strtol for a more robust cross-platform alternative when this is a possibility.
Lesezeichen