Continuing from 6v6gt's first point, analogRead(0) will read from pin A0. pinMode(0) will set the pin mode of digital pin 0. These are not the same pin.
Try to use the names printed on the Arduino board. "A0" instead of "0" for the first analog pin. Some Arduinos have pins like RX_LED that can be used in the code with those names.