Added compatibility with Arduino Mega