AURDINO PROGRAMME. - Q-Division-2019-2020-Even/Team-18 GitHub Wiki
const int ledPin = 13;
const int ldrPin = A0;
void setup() {
// put your setup code here, to run once:
pinMode(8,OUTPUT);
pinMode(7,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
Serial.begin(9600);
}
void loop()
{
char Serial_data;
Serial_data=Serial.read();
if (Serial_data=='1') {
digitalWrite(13, HIGH);
Serial.println("Turn on the LED : ");}
else if(Serial_data=='2')
{ digitalWrite(13,LOW);
Serial.println("led is off");}
digitalWrite(3,HIGH);
digitalWrite(7,LOW);
delay(1000);
digitalWrite(3,LOW);
digitalWrite(7,HIGH);
delay(1000);
digitalWrite(7,LOW);
digitalWrite(5,HIGH);
delay(1000);
digitalWrite(5,LOW);
digitalWrite(8,HIGH);
delay(1000);
digitalWrite(8,LOW);
digitalWrite(4,HIGH);
delay(1000);
digitalWrite(4,LOW);
digitalWrite(8,LOW);
delay(1000);