hello all....im beginner with all this and i really need help with this.

im upload the program to my arduino uno r3...but it send me this message...error

Arduino: 1.6.6 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\Muhamad\Documents\Arduino\no1\no1.ino: In function 'void setup()':

no1:53: error: redefinition of 'void setup()'

void setup() {

^

no1:1: error: 'void setup()' previously defined here

void setup() {

^

C:\Users\Muhamad\Documents\Arduino\no1\no1.ino: In function 'void loop()':

no1:65: error: redefinition of 'void loop()'

void loop() {

^

no1:6: error: 'void loop()' previously defined here

void loop() {

^

exit status 1
redefinition of 'void setup()'

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

How can we help when you have not posted the code that causes the errors.

Is it possible that the compiler is telling the truth when it says "'void setup()' previously defined here"

If it is, try removing or renaming one of them.

...R

ohh wait let me copy.....but on my tools it dont have adruino uno r3??

It sounds like you have code in 2 (or more) tabs of the IDE both of which have a setup() function

i copy the program from Grathio Labs....i paste it to my arduino uno r3....did i have to edit it??when i upload it say error....when i deleted the highlite it come to next error...i deleted it...it come to another error....im very frustrated now...can anybody help me

i copy from this site Secret Knock Detecting Door Lock

Please read this before posting a programming question then post your code here so that we can see what you are trying to do.

How many times does setup() appear in your program ?
How many tabs have you got in the IDE ?

Does your sketch look like this?

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}«« sketch copied from 
    http://grathio.com/2009/11/secret_knock_detecting_door_lock/
    pasted here »»

Remove the empty setup() and loop() functions.

FYI, I think there's a mistake in the schematic.

He's got the collector and emitter swapped on the transmitter.

it shows this error...

Arduino: 1.6.6 (Windows 10), Board: "Arduino/Genuino Uno"

Warning: platform.txt from core 'Arduino ARM (32-bits) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
no1:49: error: variable or field 'pinMode' declared void

pinMode(lockMotor, OUTPUT);

^

no1:50: error: expected constructor, destructor, or type conversion before '(' token

pinMode(redLED, OUTPUT);

^

no1:51: error: expected constructor, destructor, or type conversion before '(' token

pinMode(greenLED, OUTPUT);

^

no1:52: error: expected constructor, destructor, or type conversion before '(' token

pinMode(programSwitch, INPUT);

^

no1:54: error: 'Serial' does not name a type

Serial.begin(9600); // Uncomment the Serial.bla lines for debugging.

^

no1:55: error: 'Serial' does not name a type

Serial.println("Program start."); // but feel free to comment them out after it's working right.

^

no1:57: error: expected constructor, destructor, or type conversion before '(' token

digitalWrite(greenLED, HIGH); // Green LED on, everything is go.

^

no1:62: error: variable or field 'knockSensorValue' declared void

knockSensorValue = analogRead(knockSensor);

^

no1:64: error: expected unqualified-id before 'if'

if (digitalRead(programSwitch) == HIGH) { // is the program button pressed?

^

no1:67: error: expected unqualified-id before 'else'

} else {

^

no1:72: error: expected unqualified-id before 'if'

if (knockSensorValue >= threshold) {

^

C:\Users\Muhamad\Documents\Arduino\no1\no1.ino: In function 'void listenToSecretKnock()':

no1:106: error: invalid conversion from 'long unsigned int (*)()' to 'int' [-fpermissive]

now = millis;

^

no1:122: error: invalid conversion from 'long unsigned int (*)()' to 'int' [-fpermissive]

now = millis;

^

no1:129: error: 'validateKnock' was not declared in this scope

if (validateKnock() == true) {

^

no1:130: error: 'triggerDoorUnlock' was not declared in this scope

triggerDoorUnlock();

^

no1:143: error: 'validateKnock' was not declared in this scope

validateKnock;

^

C:\Users\Muhamad\Documents\Arduino\no1\no1.ino: At global scope:

no1:161: error: variable or field 'triggerDoorUnlock' declared void

void triggerDoorUnlock {

^

no1:162: error: expected '}' before ';' token

Serial.println("Door unlocked!");

^

no1:166: error: expected constructor, destructor, or type conversion before '(' token

digitalWrite(lockMotor, HIGH);

^

no1:167: error: expected constructor, destructor, or type conversion before '(' token

digitalWrite(greenLED, HIGH); // And the green LED too.

^

no1:169: error: expected constructor, destructor, or type conversion before '(' token

delay (lockTurnTime); // Wait a bit.

^

no1:171: error: expected constructor, destructor, or type conversion before '(' token

digitalWrite(lockMotor, LOW); // Turn the motor off.

^

no1:174: error: expected unqualified-id before 'for'

for (i = 0; i < 5; i++) {

^

no1:174: error: 'i' does not name a type

for (i = 0; i < 5; i++) {

^

no1:174: error: 'i' does not name a type

for (i = 0; i < 5; i++) {

^

no1:181: error: expected declaration before '}' token

}

^

exit status 1
variable or field 'pinMode' declared void

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

it shows this error...

What is "it" ?

Please post the program that you are trying to compile.
Which Arduino board do you have and which board is selected in Tools/Board in the IDE ?

sir i copy the code exactly from this website

i cannot attach the file....i tried 2x it say got problem...but i copy the programming exactly from the website above...
im using adruino uno r3....but in my tools it dont show adruino uno r3...it show adruino/genuino uno..
and im using windows 10

The code on that website compiles fine for me.

It compiles OK for me too. What version of the compiler are you using ?

im using software adruino 1.6.6 sir....

in tools now have adruino/Genuino uno only....dont have adruino uno r3....
and programer im using "AVRISP mkll"

You may have more than one sketch in your directory - then the compiler would see several setup()'s
and loop()'s.

ok sir...now the program success full sendind to adruino uno r3....the light function...but i press the record button and try knock the motor dont want to function??i did like Gathio diagram....can you help me....

What motor are you using?

If you're using a transistor to power the motor, make sure and read my earlier post about the schematic error.