Automatic Barrier Opening system Hello! I am Shlok Jain. I have made Automatic Barrier Opening System. It's a very easy task to make this. If you hane not viewed my youtube video then go and view it. Here it is. Also don't forget to like, share, and subscribe my channel. Materials Required Arduino UNO Ultrasonic sensor Servo motor some jumper wires breadboard Steps to make it Step 1: Make connections according to given circuit diagram. Step 2: Now download arduino IDE. Now open application. Clear everything written on it. And paste following code there. CODE OUTPUT Copy code #include < Servo . h > int trig = 2 , echo = 3 ; Servo servo ; void setup ( ) { servo . attach ( 5 ) ; pinMode ( trig , OUTPUT ) ; pinMode ( echo , INPUT ) ; } void loop ( ) { long samay , dist ; digitalWrite ( trig , LOW ) ; d...
Comments
Post a Comment