Arduino Basics: Digital And Analog For Input And Output

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • In today's tutorial we'll learn digital and analog inputs and outputs. We'll build a simple circuit with an LED, button, and potentiometer to demonstrate how to read and interpret digital and analog signals. We'll also use these signals to control the LED. by the end of this tutorial, you'll have the knowledge to create your own projects.
    Code & Wiring Github: github.com/kar...
    Highly Recommend These Kits
    Arduino Kit: amzn.to/3R65Jn8
    KeyeStudio Sensors Kit: amzn.to/3R6Hq8o

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

  • @haruka2632
    @haruka2632 4 месяца назад +7

    PWM is not analog output. That should have been much better clarified. Pulse Width Modulation is still square waves, unlike the true analog output graphs or diagrams shown

  • @micromasterytutorials
    @micromasterytutorials  Год назад +6

    Hey you! Thanks for watching, feel free to comment any question you have, I would LOVE to help you out! :)

    • @AerisYong-kz4pk
      @AerisYong-kz4pk 3 месяца назад

      Hi, if I were to program a rain sensor using Python, a breadboard and an arduino uno board, should I connect AO on the module to A1 or AO on the Analog Input of the arduino uno board?

    • @AerisYong-kz4pk
      @AerisYong-kz4pk 3 месяца назад

      And how should I call the Pin assignment on the Python program? What is the Pin number for AO or A1? I can't seem to call it using 14 or 15.

    • @AerisYong-kz4pk
      @AerisYong-kz4pk 3 месяца назад

      Sorry, I know this is an old video, but I will appreciate it if anyone could help me out.

    • @AerisYong-kz4pk
      @AerisYong-kz4pk 3 месяца назад

      Good video btw

  • @mohammedowais7143
    @mohammedowais7143 Год назад +5

    Great video mate
    you should make more of these

  • @Aerobrake
    @Aerobrake 4 месяца назад +1

    Afaik PWM is not analog but its far more granular than just a button. Cool video!

  • @TheRealOderless635gnat
    @TheRealOderless635gnat 8 месяцев назад +2

    U deserve a sub

  • @Corbot130
    @Corbot130 Год назад +2

    Great vid!

  • @AerisYong-kz4pk
    @AerisYong-kz4pk 3 месяца назад

    Hi, if I were to program a rain sensor using Python, a breadboard and an arduino uno board, should I connect AO on the module to A1 or AO on the Analog Input of the arduino uno board?
    And how should I call the Pin assignment on the Python program? What is the Pin number for AO or A1? I can't seem to call it using 14 or 15.
    Sorry, I know this is an old video, but I will appreciate it if anyone could help me out.
    This is a great video by the way!

  • @BotondBereczki
    @BotondBereczki 8 месяцев назад

    amazing video

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

    thank yoy

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

    good video.

  • @usdohs
    @usdohs 5 месяцев назад

    How would you write the code to use an analog input to control a digital/logic output when the analog value is in between two set values? I.E. On from 0ohm to 2k ohm, off between 2k ohm and 8k, on from 8kohm to 10k? Or light an led when temperature sensor reads between 20-50 Celsius?

    • @Arcadia240
      @Arcadia240 4 месяца назад +1

      Here you go:
      int temp_pin = A1; //temperature sensor analog pin
      int temp_value = 0; //stores temperature value
      int led = 13; //led digital pin
      void setup() {
      //setting the led pin as output
      pinMode(led, OUTPUT);
      }
      void loop() {
      //the way you read the temperature varies upon your temperature sensor, this will be different in your code.
      temp_value = analogRead(temp_pin);
      if(temp_value >= 20 && temp_value

  • @elfrad4775
    @elfrad4775 10 месяцев назад +1

    Hi, nice video but I have a question. I did the exact same thing and the analogRead return 65535: and I don't know why. I made some research and it looks like it could be about the resolution. Do you have an idea how I could resolve my problem?

    • @DJL7777
      @DJL7777 5 месяцев назад +1

      Leave your code in your own comment :) then we can have a look!

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

    Can i use both potentiometers and buttons to take the values into pc? Just to read values and print them at serial monitor! I want to use them in maxmsp

  • @minatoplays02
    @minatoplays02 8 месяцев назад

    I AM TOTALY UNDERSTANDING THIS CODE 😅

  • @digitaldata6087
    @digitaldata6087 3 месяца назад

    In this why you can't take brightness variable as a integer

  • @paulhetherington3854
    @paulhetherington3854 2 месяца назад

    Arduino -- Netherlands , Duch

  • @paulhetherington3854
    @paulhetherington3854 2 месяца назад

    /4''px UI' chrimed dach tn < frch ston mol wn < mechian vk~tmp mrk/
    /ba molchz wn < 2''px UI' kol xls < hlvz floch < rol HUD cnnon/
    /< > 10v ir kol vtDrRpx < thrmch Vw(vtd LN'' + rayz)/
    /cnt: 2 ench tk mol < vrchz t''sfr ba horx orb < rol chrw wfrx xls chemRx i.e. ~tmp mrch/

  • @VishalSh-pb8sr
    @VishalSh-pb8sr 4 месяца назад

    can you please tell about the arduino rees52 i'm getting trouble in connecting the arduino ide actually it's not detecting ...🥲