rpi revision detection and pin mapping, added DEBUG