user27323: I want to read ADC from the pin A0 and A1. I have written in this code, however.
I took this code came from Nick Gammon  
Thank You
//////////////////////////////////////////////////////////////////////////////
this is code
const byte adcPin = 0;  // A0

const int MAX_RESULTS = 256;

volatile int results [MAX_RESULTS];
volatile int resultNumber;

// ADC complete ISR
ISR (ADC_vect)
  {
  if (resultNumber >= MAX_RESULTS)
    ADCSRA = 0;  // turn off ADC
  else
    results [resultNumber++] = ADC;
  }  // end of ADC_vect

EMPTY_INTERRUPT (TIMER1_COMPB_vect);

void setup ()
  {
  Serial.begin (115200);
  Serial.println ();

  // reset Timer 1
  TCCR1A = 0;
  TCCR1B = 0;
  TCNT1 = 0;
  TCCR1B = bit (CS11) | bit (WGM12);  // CTC, prescaler of 8
  TIMSK1 = bit (OCIE1B);  // WTF?
  OCR1A = 39;    
  OCR1B = 39;   // 20 uS - sampling frequency 50 kHz

  ADCSRA =  bit (ADEN) | bit (ADIE) | bit (ADIF);   // turn ADC on, want interrupt on completion
  ADCSRA |= bit (ADPS2);  // Prescaler of 16
  ADMUX = bit (REFS0) | (adcPin & 7);
  ADCSRB = bit (ADTS0) | bit (ADTS2);  // Timer/Counter1 Compare Match B
  ADCSRA |= bit (ADATE);   // turn on automatic triggering

  // wait for buffer to fill
  while (resultNumber < MAX_RESULTS)
    { }

  for (int i = 0; i < MAX_RESULTS; i++)
    Serial.println (results [i]);

  }  // end of setup

void loop () { }


user10794: In the code you posted the first line is:

const byte adcPin = 0;  // A0


To read from A1 the change is simple:
const byte adcPin = 1;  // A1



i am sorry i come from thailand

Whatever country you are from does not excuse from you posting the same question many, many times.
I suggest you read the datasheet:
ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet
Scroll down to 24.9.1 ADMUX – ADC Multiplexer Selection Register

27323: <p>I want to read ADC from the pin A0 and A1. I have written in this code, however.</p>

<p>I took this code came from Nick Gammon  </p>

<p>Thank You
//////////////////////////////////////////////////////////////////////////////</p>

<p>this is code</p>

<pre><code>const byte adcPin = 0;  // A0

const int MAX_RESULTS = 256;

volatile int results [MAX_RESULTS];
volatile int resultNumber;

// ADC complete ISR
ISR (ADC_vect)
  {
  if (resultNumber &gt;= MAX_RESULTS)
    ADCSRA = 0;  // turn off ADC
  else
    results [resultNumber++] = ADC;
  }  // end of ADC_vect

EMPTY_INTERRUPT (TIMER1_COMPB_vect);

void setup ()
  {
  Serial.begin (115200);
  Serial.println ();

  // reset Timer 1
  TCCR1A = 0;
  TCCR1B = 0;
  TCNT1 = 0;
  TCCR1B = bit (CS11) | bit (WGM12);  // CTC, prescaler of 8
  TIMSK1 = bit (OCIE1B);  // WTF?
  OCR1A = 39;    
  OCR1B = 39;   // 20 uS - sampling frequency 50 kHz

  ADCSRA =  bit (ADEN) | bit (ADIE) | bit (ADIF);   // turn ADC on, want interrupt on completion
  ADCSRA |= bit (ADPS2);  // Prescaler of 16
  ADMUX = bit (REFS0) | (adcPin &amp; 7);
  ADCSRB = bit (ADTS0) | bit (ADTS2);  // Timer/Counter1 Compare Match B
  ADCSRA |= bit (ADATE);   // turn on automatic triggering

  // wait for buffer to fill
  while (resultNumber &lt; MAX_RESULTS)
    { }

  for (int i = 0; i &lt; MAX_RESULTS; i++)
    Serial.println (results [i]);

  }  // end of setup

void loop () { }
</code></pre>
 10794: <p>In the code you posted the first line is:</p>

<blockquote>
<pre><code>const byte adcPin = 0;  // A0
</code></pre>
</blockquote>

<p>To read from A1 the change is simple:</p>

<pre><code>const byte adcPin = 1;  // A1
</code></pre>

<hr>

<blockquote>
  <p>i am sorry i come from thailand</p>
</blockquote>

<p>Whatever country you are from does not excuse from you posting the same question many, many times.</p>

<p>I suggest you read the datasheet:</p>

<p><a href="http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf" rel="nofollow">ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet</a></p>

<p>Scroll down to <strong>24.9.1 ADMUX – ADC Multiplexer Selection Register</strong></p>
