void ADCSetup(){ // AVR Butteryfly Board Info: // The Neg. Temp. Coeff. resistor (NTC) is on ADC channel 0 // The Board Edge Voltage Input Reading (VR) is on ADC channel 1 // The Light Dependant Resistor (LDR) is on ADC channel 2 //Disable Digital Input Buffer on pins being used for analog input to save power // using the Digital Input Disable Register DIDR0 |= 0b00000001; //disable PF0 (ADC0) digital input buffer //Select Voltage Reference, Set Left-Ship Option, Set Input Channel int refSel_2b=1; //select avcc, change to 3 for 1.1V reference int adlar_1b=0; //no need to left shift int muxSel_5b = XYZ; //select ADC0 with single-ended conversion ADMUX = (refSel_2b << REFS0) + (adlar_1b<