Arduino - What is a Pulse and How to Use the pulseIn() Function (with example)

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 12

  • @mubasirkhafid9582
    @mubasirkhafid9582 Месяц назад

    Hi Mr., I want to ask if using interrupt to replace pulsein, does it only read high? How do you read push button low, Mr.? Please, use interrupt to replace pulsein

  • @yousaftoki1599
    @yousaftoki1599 2 года назад

    Awesome knowledge sir..

  • @thedoctor5036
    @thedoctor5036 2 года назад

    why aren't you up the trend of youtube ?
    you deserve it bro! keep up :D

    • @RoboticsBackEnd
      @RoboticsBackEnd  2 года назад

      Thanks Doctor! Consider subscribing and liking the video to help me reach higher numbers ;)

  • @jimmym2719
    @jimmym2719 Год назад

    Good explanations thank you for teaching 💕

  • @Daminski_Elevator
    @Daminski_Elevator Год назад

    Thanks for video! I try to do PWM switch (ON/OFF) with pulseIn() function like in your video. But there is no reaction. Could you help me to fix this problem?

  • @SaintNicholas322
    @SaintNicholas322 2 года назад

    Good video thanks for making this, very helpful!

  • @subhashkendole3005
    @subhashkendole3005 9 месяцев назад

    i am trying to compile for Attiny402 device, but Arduino gives error " error compiling for board Attiny41/402/212/202"
    please advise

  • @Europayacht
    @Europayacht 2 года назад

    Very comprehensive - thank you!

  • @garymitchell4543
    @garymitchell4543 Год назад

    hi would this work if i was to count the pulses that come off a 24 v coin mechanism? My coin mech sends a pulse each time a quarter is deposited?

    • @RoboticsBackEnd
      @RoboticsBackEnd  Год назад +1

      You'd need to use a relay to convert 24V into 5V so you can plug it into the Arduino.

  • @lastchance045
    @lastchance045 9 месяцев назад

    My results do not match yours - will you please tell me why
    #define buttonPin 2
    void setup ()
    {
    Serial.begin (9600);
    pinMode(buttonPin, INPUT);
    }
    void loop()
    {
    unsigned long duration = pulseIn(buttonPin, HIGH, 10000000);
    Serial.println (duration);
    }
    i pressed the button several times : 2sec ,2 sec, 2sec, 6 sec
    these results were shown on serial monitor
    60
    61
    41
    995942
    64
    0
    42
    0
    0