Thursday, October 17, 2024

Smart Blind stick

  •  #define trig 2 #define echo 4long safe;
  • long distance;long t;
  • void setup(){
  •     pinMode(trig, OUTPUT);
  •     pinMode(echo, INPUT);
  •     pinMode(7, OUTPUT);
  •     pinMode(8, OUTPUT);  }
  • void loop(){
  •        digitalWrite(trig,LOW);
  •        delayMicroseconds(2); 
  •        digitalWrite(trig,HIGH);
  •        delayMicroseconds(10);   
  •        digitalWrite(trig,LOW);
  •        t=pulseIn(echo,HIGH);
  •                 distance=t/74/2;
  •                 safe=distance;
  •          if(safe<=10){
  •         digitalWrite(7,HIGH);
  •         digitalWrite(8,HIGH);  }
  •    else{
  •         digitalWrite(7,LOW);
  •         digitalWrite(8,LOW);  }}   

Friday, April 19, 2024

How to code Bluetooth module..

 How to code Bluetooth module with Arduino?

  • Writing the Arduino HC-05 bluetooth module code:
  1. void setup(){
  2. Serial. begin(9600);
  3. QuartzBT. begin(9600); //Default Baud for comm, it may be different for your Module.
  4. Serial.println("The bluetooth gates are open.\n Connect to HC-05 from any other bluetooth device with 1234 as pairing key!." ); }
  • How does a Bluetooth module work?
    They utilize radio waves to establish connections and enable communication between devices such as smartphones, computers, IoT devices, and more. Bluetooth modules operate on specific frequencies within the 2.4 GHz range and provide reliable, low-power, and secure wireless connectivity.

Simple code

Simple code of  Night rider LED pattern arduino uno program.

void setup(){   

    pinMode(1, OUTPUT);                           

    pinMode(2, OUTPUT);                            }

void loop(){

    digitalWrite(1, HIGH);

    delay(100);

    digitalWrite(1, LOW);

    digitalWrite(2, HIGH);

    delay(100);

    digitalWrite(2, LOW);}

Thursday, April 18, 2024

ARDUINO IDE INTERFACE AND TOOLS..

 ARDUINO IDE INTERFACE..


In the left top part there are five buttons:

    Verify Button

    Verify. Allows you to compile your sketch and check if there are any errors.

    Upload Button

    UploadWhen you press this button, it first compiles, even if you pressed the “Verify” button before. Then, if there are no errors, the binary file is uploaded to the board, which is connected to the specified port 

    New Button

    New. Creates a new sketch.

    Open Button

    Open. To open one of the previously created sketches or an example sketch.

    Save Button

    Save. Nothing surprising here, this button saves the current sketch.

    In the right top part there is only one button:

    Serial Monitor Button

    Serial Monitor. Opens a window with which you can communicate with your board using the serial UART interface 

    Arduino IDE

    ARDUINO IDE


    Arduino IDE 

    The new major release of the Arduino IDE is faster and even more powerful! In addition to a more modern editor and a more responsive interface it features autocompletion, code navigation, and even a live debugger.

    Nightly builds with the latest bugfixes are available through the section below.

    download  link : arduino software

    How to connect motor controller to Arduino?

     How to connect motor controller to Arduino?

        Arduino Motor Control Setup
    1. Connect 5V and ground of the IC to 5V and ground of Arduino.
    2. Connect the motor to pins 2 and 3 of the IC.
    3. Connect IN1 of the IC to pin 8 of Arduino.
    4. Connect IN2 of the IC to pin 9 of Arduino.
    5. Connect EN1 of IC to pin 2 of Arduino.
    6. Connect SENS A pin of IC to the ground.


    • How does L298N motor driver work?
        The L298N is a dual H-Bridge motor driver which allows speed and direction control of two DC motors at the same time. The module can drive DC motors that have voltages between 5 and 35V, with a peak current up to 2A.



    L293D Motor Driver Shield

    L293D Motor Driver Shield

    This L293D is a monolithic integrated, high voltage, high current, 4 channel driver. With this you can use DC motors and power supplies of up to 36 Volts. it can drive some pretty big motors and it can supply a maximum current of 600mA per channel, the L293D chis is also known as a type of H-Bridge. The H-Bridge is typically an electrical circuit that enables a voltage to be applied across a load in either direction to a load.



    Specifications

    Current
    Maximum Current per Channel - 600mA Peak Current - 1.2A
    I/O Pins
    Directly plug into Arduino Uno, Arduino Mega, etc. 4 Channels for DC motors and stepper motors(can drive 4 DC motors or 2 Stepper motors in the same time),
    Input Voltage
    4.5V ~ 36V
    Operating Voltage
    5 V
    Special Features
    Pull down resisters External power terminal for motors Support unipolar and bipolar stepper motors

    How to connect Bluetooth module HC-06 to Arduino Uno?


    How to connect Bluetooth module HC-06 to Arduino Uno?

        The HC-06 module has four pins which are all required in order to make a connection with the arduino UNO. The VCC pin is where the module receives its input voltage and is thus connected to the 5V pin on the arduino. The GND on the module is the ground pin which connects to the ground pin on the arduino.



     

    HC-06 Bluetooth module

     HC-06 Bluetooth module

    • What is the use of HC-06 Bluetooth module?
     The HC-06 is a class 2 slave Bluetooth module designed for transparent wireless serial communication. Once it is paired to a master Bluetooth device such as PC, smart phones and tablet, its operation becomes transparent to the user. All data received through the serial input is immediately transmitted over the air.
    • What is HC Bluetooth module?
            The HC-05 Bluetooth Module 
    HC-05 Bluetooth Module - Buy HC-05 Module Online at ...
    adds wireless communication to your project to communicate via Bluetooth to any Bluetooth enabled Laptop or Mobile Device
    . The module communicates at 9600 baud rate via USART protocol.

    HOW TO CONNECT PIR SENSOR TO ARDUINO BOARD..

    HOW TO CONNECT PIR SENSOR TO ARDUINO BOARD..


     Wiring the PIR motion sensor to an Arduino is pretty straightforward – the sensor has only 3 pins.

    1. GND – connect to ground.
    2. OUT – connect to an Arduino digital pin.
    3. 5V – connect to 5V.                          


    WATCH NOW pir sensor
                          

    PIR SENSOR..

     PIR SENSOR..

        A PIR sensor is an electronic sensor used in motion detectors such as automatically triggered lighting devices and protection systems that measure devices emitting infrared light in their field of view.


    • What does PIR stand for?

    Passive Infra-Red
        PIR (Passive Infra-Red) detection is a technology used in security systems to detect movement or intruders by recognising light emitted from nearby objects.


    Wednesday, April 17, 2024

    how to work servo motors..

     How to work servo motors..






    ULTRASONIC SENSER WORKING...

     ULTRASONIC SENSER WORKING...






    Ultrasonic sensor

     Ultrasonic sensor 

    What is an Ultrasonic Sensor?

         An ultrasonic sensor is an instrument that measures the distance to an object using ultrasonic sound waves. An ultrasonic sensor uses a transducer to send and receive ultrasonic pulses that relay back information about an object's proximity.

    • What is an ultrasonic sensor used for?
            The ultrasonic sensor is a non-contact type of sensor used to measure an object's distance and velocity. This sensor operates on sound wave property to measure the velocity and distance of the object

    Comments

    servo motor

      servo motor

        A servo motor is a rotary actuator that allows for precise control of angular position. It consists of a motor coupled to a sensor for position feedback. It also requires a servo drive to complete the system. The drive uses the feedback sensor to precisely control the rotary position of the motor.

    • What is the advantage of servo?
    Advantages of Servo Motors | Heason
            The rotor of a servo motor uses permanent magnets and can be infinitely positioned between magnetic poles on the stator by varying the voltage and current between windings. Servo motors are well suited to precision to applications where accurate control of motor speed, position and/or torque is required.


    devices we use with arduino

    Some Devices we  use with arduino..

    1. LED LIGHTS


    2. JUMPER WIRES

    3. BREAD BOARD

    4. SERVO MOTORS

    5. ULTRASONIC SENSERS










                                                               
                   

    How to connect Arduino UNO?

     How to connect Arduino UNO?

    1. Launch the Arduino IDE (1.8. 0 or later).
    2. Connect the board to PC.
    3. Select the Arduino UNO WiFi as board in the Tools>Board menu.
    4. Select the corresponding serial port in the Tools>Port menu.
    5. Upload the ESP Recovery sketch. It is into the UNOWiFiDev. Edition Library. Download it from Library Manager.
          Connection over USB
    1. Connect the Arduino hardware via USB, by choosing the connection type USB.
    2. Choose the board type and the port number from the Choose board and Choose port menus. ...
    3. After the upload is complete, click Test connection to test the connection between your host computer and the Arduino board.