Interface DC motor and Buzzer with Arduino. Develop an Arduino sketch to rotate motor anti-clockwise for 10 seconds after that sound buzzer for 2 seconds and silent at last.

Here i am using online IDE Tinkercad . If you don't know what is tinkercad then refer my blog HERE or else you can use offline IDE also.

Code :- 

void setup()

{ 

pinMode(5, OUTPUT);

  pinMode(6, OUTPUT);

  pinMode(7, OUTPUT);

}

void loop()

{

  digitalWrite(6,LOW) ;

digitalWrite(7,HIGH) ;

delay(10000) ;

digitalWrite(5,HIGH) ;

  delay(2000);

}

Output :-



Comments

Popular Posts

3 Develop an interfacing circuit and a sketch to display decimal data on 7-Segments. The 3- digit number is sent over serial communication.

Interface 8 LEDs with Arduino UNO (digital 0 to digital 7). Develop an Arduino sketch for following: a. Toggle all LEDs continuously every 500 milliseconds. b. Toggle even and odd LEDs continuously for 2 seconds. c. Generate left series (i.e. used during Navaratri)