Arduino example for mini PIR motion sensor from Banggood

Поделиться
HTML-код
  • Опубликовано: 19 авг 2017
  • Link to buy:
    - mini PIR sensor: www.banggood.com/Mini-IR-Infr...
    - Arduino nano: www.banggood.com/ATmega328P-N...
    The code:
    int LED = 13; // define PIN for LED - Biultin LED is on PIN 13
    int PIR = 2; // define PIN for PIR motion sensor - PIN D2
    void setup() {
    pinMode(LED,OUTPUT); // define LED pin as output
    pinMode(PIR,INPUT); // define PIR pin as input
    }
    void loop() {
    digitalWrite(LED,digitalRead(PIR)); // Write value of PIR sensor to LED
    }

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

  • @TheCowboysdude
    @TheCowboysdude 3 года назад

    This is gotten me most of the way :) Trying to use this to wake my monitor. Is that possible? Great job on the project!! Very grateful! Thank you.

  • @WagnerCecatoMavigno
    @WagnerCecatoMavigno 6 лет назад +1

    What is the Sensitivity of this sensor? Did you try it? 5 meters ? 10 meters? ....

    • @piechotam
      @piechotam  6 лет назад +1

      Wagner Cecato Mavigno I haven't test it yet, but I can say it works good on small distances, below 5m

    • @christiannielsen3863
      @christiannielsen3863 5 лет назад +1

      1 meter only

  • @error2254
    @error2254 4 года назад +1

    Could some one paste code here for easier access

    • @piechotam
      @piechotam  4 года назад

      Code is in the description below the video

  • @eyalitmanager
    @eyalitmanager 4 года назад

    So... ?
    Where is the code?
    I need to make sounds when a door is opened.
    Can anyone help with this please???

    • @piechotam
      @piechotam  4 года назад

      The code is in the description below the movie

    • @eyalitmanager
      @eyalitmanager 4 года назад

      Not enough. I need a code that will each time somebody open a door, the arduino will send voice message from speakers

  • @riseoftech4k332
    @riseoftech4k332 7 лет назад

    I love your video man!!! GREAT JOB... I started to make some arduino videos, could you come check it out and tell me what you think... thanks