Posts

Showing posts from January, 2023

Arduino Bluetooth Car Code

Image
                                                    //***************************Written by Simple Circuits*****************************//     char t; void setup() { pinMode(13,OUTPUT);   //left motors forward pinMode(12,OUTPUT);   //left motors reverse pinMode(11,OUTPUT);   //right motors forward pinMode(10,OUTPUT);   //right motors reverse pinMode(9,OUTPUT);    //Front Led pinMode(8,OUTPUT);    //Back led pinMode(7,OUTPUT);    //Reverse Parking led pinMode(6,OUTPUT);    //Buzzer Serial.begin(9600);  }   void loop() { if(Serial.available()){   t = Serial.read();   Serial.println(t); }   if(t == 'F'){            //move forward(all motors rotate in forward direction)   digitalWrite(13,HIGH);   digitalWrite(11,HIGH); }   else if(t == 'B'){      //move reverse (all motors rotate in reverse direction)   digitalWrite(12,HIGH);   digitalWrite(10,HIGH); }   else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors doesn't

Arduino Bluetooth Car Circuit Diagram

Image
 

Arduino Code Smart Bin

Image
  //**************************Written by Simple Circuits*****************************//    #include<Servo.h> const int trigPin = A2; const int echoPin = A1; const int servoPin = A0;  // defines variables double SetDelay, Input, Output, ServoOutput;  Servo myServo; //Initialize Servo. void setup() { pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output pinMode(echoPin, INPUT); // Sets the echoPin as an Input Serial.begin(9600); // Starts the serial communication myServo.attach(servoPin); //Attach Servo Input = readPosition();  } void loop() {   Input = readPosition();    ServoOutput=Input;    myServo.write(ServoOutput);   if(ServoOutput ==140)      {       SetDelay=3000;       }     else{       SetDelay=100;       }    delay(SetDelay);   }   float readPosition() {   delay(40);    long duration, var;   int distance;    // Clears the trigPin   digitalWrite(trigPin, LOW);   delayMicroseconds(2);   // Sets the trigPin on HIGH state for 10 micro seconds   digitalWrite(trigPin, HIG

Arduino Smart Dustbin

Image
Arduino Smart Dustbin   Materials Required:-  Plastic Waste Bin: - https://amzn.to/3GoDhIi MDF Board: - https://amzn.to/3IyKB6U Arduino Nano: - https://amzn.to/3Zlpk6i Ultrasonic Sensor: - https://amzn.to/3GKJ2kK 9G Servo Motor: - https://amzn.to/3VSKHcq 9V HW Battery: - https://amzn.to/3jZFemU Jumper Wires :- https://amzn.to/3ihQpHd 25V 2200uf Capacitor:-  https://amzn.to/3yLfjTT