analog input issuses

for (byte bitMask = 128; bitMask > 0; bitMask >>= 1){
    digitalWrite(clockPin, LOW);
    digitalWrite(serialOnesPin, HIGH);
    digitalWrite(serialTensPin, HIGH);
    digitalWrite(serialHundsPin, HIGH);
    digitalWrite(clockPin, HIGH);
  }

That's a pretty roundabout way of doing eight iterations. In the absence of comments, any particular reason?

the code dont fit

probably because there's too much of it.

not sure y its like that.
its a code that i found on the net.
im new so only know the very basics.
if you know a better way im all ears.

Where did you find that code, because that is a LOT of code.
Do you have a link?

sadly i did not keep the link.
guess i should have.

Could you retrace your steps?

For now, all you need to show is whether or not a number of inputs work.
So, write a small sketch that does just that, using known I/O mechanisms, like Serial.print.

thanks ill try that.

warrenf:
other thing you should probly know is that i made a boo boo and stuck 9v threw the 5 inputs this is y im trying to use the analog input.
silly me.
and the transistor i changed to a relay
and also tried to add in a wake up funtion for the camera with a second relay.

so i may well have messed this whole thing up.

Quite possibly. A relay and a transistor are not usually interchangeable. What you're trying to do does not sound especially hard, but the picture you posted shows a fairly complex circuit, and I don't know whether you're getting even the basics right let alone wiring up things like that correctly.

the cct worked.
problems came after i put the 9v battery in the wrong side.
now i just cant get the analogs to work.

Ok you have the pull down resistor wired correctly, I'm assuming.

You don't need to make them analog unless your reading varying voltages, or resistances, I mean it will work, but you don't need it.

Just for now make the buttons and switches, digital, that way all you need to see is if it is HIGH or LOW.

ok. all the digital pin are being used. and the origanal 5 that were the switches are damaged. this is y im using analog.

Ok but, I just want you to test the buttons and switches without anything else on the arduino. When you know for sure that everything is working ,you can move them the analog pins. You need to see if you get either 1 or 255 when it is HIGH, and 0 for LOW

You could do a very simple ASCII "logical analyser".
Set all I/O pins (except pins zero and one!) to be inputs in "setup()", and enable their pullups.
In "loop()", digitalRead every pin and Serial.print its value as one or zero, and at the end of "loop()", call "Serial.println()" so all the results are on a single line.
As the program is running, simply ground a pin at a time, and check that the display in the serial monitor reflects this.
This program shouldn't be more than a dozen or so lines.

hey guys thanks for the advice i did the serialwrite thing to check if its picking up the inputs. and when i run the simple sketch it picks up all the buttons .
but when i put the end cct together it will not pick up the start stop button. but picks up all the others?
any ideas?

any ideas?

Post code.

its the code i posted at the beginning of the thread

hey so iv figured out that the problem is not hardware. its in the sketch. iv stared at it for hours and cant figure out what the problem is. can some one take a look?

Then how did you determine that it is software not hardware?

const int startPin = A0; //input for begin button
void setup ()
{
  pinMode(startPin, INPUT);
  Serial.begin(9600);
}

void loop ()
{
  Serial.println (digitalRead (startPin));
}

What does that do? (uncompiled, untested)

What is connected to digital pin 2?

i loaded the sketch and all buttons work. cept the start button.
so i changed the sketches buttons allocations, so changed the start and up around.
same story. what used to be the start buttons works now to increase the values,
but it still wont start when you press the new start button

hope that makes sense