0% found this document useful (0 votes)
5 views15 pages

Programme 3

The document contains repeated Arduino code that sets pin 2 as an output and pin 5 as an input. In the loop function, it checks if pin 5 is HIGH, and if so, it turns on pin 2 for 5 seconds before turning it off. This code is duplicated multiple times throughout the document.

Uploaded by

amine
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views15 pages

Programme 3

The document contains repeated Arduino code that sets pin 2 as an output and pin 5 as an input. In the loop function, it checks if pin 5 is HIGH, and if so, it turns on pin 2 for 5 seconds before turning it off. This code is duplicated multiple times throughout the document.

Uploaded by

amine
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

} void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

}
void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

}
}

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);
}

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);


digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

{
digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

{
digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)
{

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:


if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

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

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

}
void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

}
void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW); void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

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

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

}
void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

void setup() {

// put your setup code here, to run once:

pinMode(2, OUTPUT);

pinMode(5, INPUT);

}
void loop() {

// put your main code here, to run repeatedly:

if(digitalRead(5)==HIGH)

digitalWrite(2, HIGH); delay(5000);

digitalWrite(2, LOW);

You might also like