Your code compiles, but as Gerben said, the printf won't do anything in its current state, as no output handlers are defined for it. Why go to all that trouble when you can do this?
adc_value = analogRead (0);
delay (100); // stop output spamming your monitor
You could conceivably make
printf work by following the tutorial here: http://playground.arduino.cc/Main/Printf
However I don't really see the point, when what I posted is much easier.
If performance is an issue, you might want to use the "advanced" code.
That "advanced" code above doesn't give you any more performance, because is still blocks. You can do a non-blocking version easily and readably enough:
const byte adcPin = 0; // A0
void setup ()
ADCSRA = bit (ADEN); // turn ADC on
ADCSRA |= bit (ADPS0) | bit (ADPS1) | bit (ADPS2); // Prescaler of 128
ADMUX = bit (REFS0) | (adcPin & 0x07); // AVcc
} // end of setup
void loop ()
bitSet (ADCSRA, ADSC); // start a conversion
working = true;
// the ADC clears the bit when done
if (bit_is_clear(ADCSRA, ADSC))
int value = ADC; // read result
working = false;
// do other stuff here
} // end of loop
Now that code (which admittedly fiddles with the registers) doesn't block so you could be doing other things during the conversion. I don't see any reason you wouldn't use that on a commercial product.
See ADC conversion on the Arduino (analogRead) for more details.