fixed bugs causing compile-time errors in p2d2.ino
made LED calibration work