ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Arduino - Analogue Inputs

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ส.ค. 2024
  • In this video we use analogRead to read an analogue input and we use analogWrite control an analogue output on an Arduino.
    Get hold of these fantastic little devices here:
    10K Potentiometer: amzn.to/2Uyi86K
    Arduino Uno: amzn.to/3aeuND3
    Arduino Mega: amzn.to/33OxUAl
    Arduino Micro: amzn.to/2XSTfom
    Arduino Pro Mini: amzn.to/2Fg75ef
    Motor + driver: amzn.to/31Lj76M
    Find us on Facebook, Instagram and Twitter @MachineShopUK
    Visit our website TheMachineShop.uk

ความคิดเห็น • 4

  • @AldrichApa
    @AldrichApa 3 หลายเดือนก่อน

    This video really helped me in my robotics class thanks!

  • @plassonade
    @plassonade 7 หลายเดือนก่อน +1

    Thanks for this very useful video. I am trying to capture my car's steering wheel buttons resistance value for each button and I didn't understand the use of another resistor in between to actually get correct readings.

    • @TheMachineShopUK
      @TheMachineShopUK  7 หลายเดือนก่อน +1

      When you are trying to read resistance you are actually reading voltage with a fixed current. Since R = V/I, so when you fix the current and the resistance changes, so should the voltage and you can read that into the Arduino

    • @plassonade
      @plassonade 7 หลายเดือนก่อน

      @@TheMachineShopUK Indeed, to give you the full story: on my car service manual it is written that there are basically two cables (SW and SWG) and that the voltage should vary between 1V to 4V depending on which button was pressed. I first connected SW to an analog pin and SWG to the GND pin on my ESP32. I could get readings and when I would press on buttons I could see the difference between readings, but the values were very random and chaotic at times, it would have been very hard to distinguish which button I would have pressed. Looking on the internet I found a thread on arduino forums where they added a 10komhs in between, I did the same and got very distinguishable values. Only thing was that I didn't really get why using a resistor was necessary and effective, and then I found your video that made me understand why I needed one. I have a tech background so I'm really a noob when it comes to electronics :)