Code for the LDR Analog Class