Monday, March 10, 2008

warning: large integer implicitly truncated to unsigned type + AVR


Warnning:


warning: large integer implicitly truncated to unsigned type






Code:

delay(1500);

Solution:

delay((unsigned char)1500);

1 comment:

Anonymous said...

had the same issue, but using timers (TCNT0, TCNT1, TCNT2)

for TCNT0, casting as an (int) worked, but not for TCNT2... (unsigned char) seemed to fix both of them...