Please help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am stuck on a new program. It’s to make an electric lock, using a passkey. Since I don’t have I keypad I’m using 3 buttons. Please take in mind I am new to Arduino and I’m only 9 years old. Also. please tell me how to fix it and exactly how to write it. Due to the fact, I’m still new to all these programming rules and words, and syntaxes.

This is the error message.
too many arguments to function ‘int digitalRead(uint8_t)’
I don’t understand it. It might be clear to the rest of you but, I don’t understand the problem. Please explain throughly.

This is my code…

#include <Servo.h>

// initialize the library with the numbers of the interface pins
Servo myservo;
int pos = 0;

void setup() {

pinMode( 7, INPUT);
pinMode( 6, INPUT);
pinMode( 5, INPUT);
pinMode( 3 , OUTPUT);
pinMode( 2 , OUTPUT);
void loop() {
digitalWrite( 2 , LOW);
delay( 1000 );
digitalWrite( 3 , LOW);
delay( 1000 );
if(digitalRead( 7, HIGH)){
while (delay(1000))
digitalRead ( 6, LOW);
if(digitalRead( 6, LOW)){
while (delay(1000))
digitalRead ( 5, HIGH);
while(digitalRead( 5, HIGH)
digitalWrite( 2, HIGH);
for(pos = 0; pos <= 180; pos += 1)

else(digitalWrite( 3, HIGH);

if(digitalRead( 7, HIGH)){

Did you mean if(digitalRead( 7) == HIGH){
The error message too many arguments to function 'int digitalRead(uint8_t)' is pretty self-explanatory; the function "digitalRead" accepts one argument, and you've tried to give it two.

Also, "delay()" (which we don't like using) doesn't return a value, so while (delay(1000)) is pretty meaningless, and the compiler will complain.

The compiler's also going to complain about the "else" without an "if", and the fact that it found the end of the file before it found a "}"

Several things are responsible for the lack of responses to your post:

  1. You didn't bother to take the time to read the post by Nick Gammon at the top of this Forum, yet felt your problem was so important that you needed to "yell" at us with a string of exclamation points. That get's you nothing here.

  2. Had you read the post by Nick, you would know that, instead of trying to yell at us, the title of the post should give a hint at the nature of the problem.

  3. You didn't use code tags when posting your source code. This makes your post longer than if it is posted within code tags, which creates a scrollable text.

  4. You didn't use Ctrl-T in the IDE to make your code more readable. This would have shown at least one programming error.

  5. You use two parameters for digitalRead() which tells me you didn't bother to read the documentation on how that function is used.

  6. Oh, did I mention that most readers here don't like to be yelled at?

Now, go back and read Nicks posts, edit your original post to use code tags, and read up on the program elements you are trying to use.

After a potty-mouthed outburst in a "report to moderator", @djtoitoitoilet is now enjoying an all-too-brief forum timeout.

I give my time here for free; I don't appreciate that.

Thanks, AWOL. I hope he uses that time wisely.

The error message too many arguments to function 'int digitalRead(uint8_t)' is pretty self-explanatory;

Only if you know what an 'argument' is in this context. See stackexchange for a discussion.