I spent to much time to solve a problem that was none. Maybe others will face this problem an fail--like me--to find the correct information. Hence, I write this post to help save time.
Problem: AnalogRead did not work. My first fault: only PB2, PB3, PB4, and PB5 can be used for ADC ... ouch ;) My second fault: I used analogRead() with PB2/PB3/PB4/PB5. Solution: Use 0,1,2,3 for ADC0-3 like
#define TINY_ADC_PB2 0x01 #define TINY_ADC_PB3 0x03 #define TINY_ADC_PB4 0x02 #define TINY_ADC_PB5 0x00 uint16_t val = analogRead(TINY_ADC_PB4); // using PB4
Maybe I'm still wrong here but I expected the analogRead() function to translate PBx to the correct ADC value. However, now everything works fine :)