code updated and corrected with the current situation of the Arduino IDE
1.0.x.