Circuit fine with ProMini analog broke with AtMega

I assembled a circuit on a breadboard which has two touch switches. They worked fine with the Arduino Pro Mini, but now that I've swapped it out for the AtMega328 with an Arduino bootloader, the analog inputs no longer work!

I added the ATMega to my board according to this schematic: http://cdn.shopify.com/s/files/1/0038/9582/files/RBBB_Instructions_06.pdf?1260749296

I've disconnected my servos to make sure they weren't the issue, and am powering it off the FTDI cable, so none of the voltage regulator stuff is there.

I have everything hooked up except that one capacitor they show on the AREF chip which doesn't look like it is needed because I'm using the internal reference, and I've read that the AREF pin is connected to nothing on regular Arduino boards.

Other than that, the two circuits as far as I can tell, are identical. I've got the two ground pins grounded. I have AVCC going to my positive rail which is connected to all my other positive rails and the positive input from the FTDI.

I can tell the code is running because I'm debugging with serial output., and when i had the servos connected they'd move when I touched the left touch switch.

But the values I'm getting are way off. The left touch switch when touched gives 1023, which is way higher than it used to give. The right touch switch gives nothing. And two leds which I have connected to oother analog pins which I'm using as digital pins don't light. The left one blinks briefly because touching the left pin triggers it, but it goes off immediately evn though it should still be on.

Any ideas what might be going on?

Heh. Nevermind. Code mistake.

I forgot pin 13, which meant that I numbered the pins for the two leds that correspond to the dip switches too low by one in my program, and that caused me to turn on the right touch switch's internal pullup when I tried to light the left led when the left switch was touched, among other bad things.

It seems to be working fine now. :-)