Find I2C Addresses on Arduino (I2C Scanner)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 มิ.ย. 2024
  • Find code and diagrams at: www.elithecomputerguy.com/201...
    I2C devices allow you to add numerous sensors and displays to your Arduino project using only 2 communication wires. The issue can be that since I2C is an Addressable Communication Protocol that you need to know the addresses of the I2C devices. This scanner sketch will allow you to determine what the addresses are of your I2C devices.
    Functional Parts in the Project:
    Arduino Uno - store.arduino.cc/usa/arduino-...
    20 x 4 I2C LCD Screen - amzn.to/2JVuKzn
    560 Piece Jumper Wire Kit - amzn.to/2MsCLjL
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @cmgkochi6418
    @cmgkochi6418 3 ปีที่แล้ว +2

    you helped me from going crazy. the lcd address turned out to be 0x3f and i was trying with all the i2c lcd libs with no progress. finally found your video and code. nice work thanks a lot

  • @Graham1904
    @Graham1904 4 ปีที่แล้ว

    I am not sure exactly how this works, and I know I2C very well, but this scanner works like a dream. I had an I2C LCD delivered the other day and the spec sheet said 0x27 for the address but I could not get it to work. I ran the scanner only to find that the address was totally different, not even close! Well described video.

  • @superpesbarbos
    @superpesbarbos 4 ปีที่แล้ว +2

    Very awesome video! Everything is pretty clear and sounds simple after your video.

  • @soloperformer5598
    @soloperformer5598 ปีที่แล้ว +1

    Thank you. This video was excellently presented with clear and concise guidelines and has been a great help.

  • @Electronics61
    @Electronics61 2 ปีที่แล้ว

    Great video. Worked right away with Serial Monitor output. Many Thanks.

  • @ahnafpiash
    @ahnafpiash 9 หลายเดือนก่อน

    Thanks for all the trouble explaining the code. really means a lot..

  • @pcbmicro
    @pcbmicro 4 ปีที่แล้ว

    Sharp Tuto thanks help a lot for debugging and lurning :P

  • @dellodel9502
    @dellodel9502 2 ปีที่แล้ว

    First of all thanks for every things you gave us.
    I have some ATMEL uC from trash and i would lik to reprogram them but i don't know the value of their working frequency (crystal) !!.
    If i want to reprogram them with known frequency program using the SPI protocol , the SPI clock pin will allow me to do it? ( without knowing the value of the clock).
    In other way the clock pin of SPI protocole will replace the crystal clock ( at least during reprogramming operation ) ?.
    Thanks.

  • @mikmik3965
    @mikmik3965 2 ปีที่แล้ว

    Great script ,Thanks alot.

  • @tommunchback1044
    @tommunchback1044 2 ปีที่แล้ว

    Thank you, I tried running the i2c scanner and had nothing but errors with the table and the switch functions it calls, what a headache. Your sketch is simple and sweet.

  • @drtechtek2165
    @drtechtek2165 4 ปีที่แล้ว

    because of you i bought one :p

  • @anil3009
    @anil3009 3 ปีที่แล้ว

    i am using an HDC2021 sensor and it has two addresses , is it possible select the detected address for the measurement.?..if yes could you please help me ..

  • @ilhamrahmatmuharam8501
    @ilhamrahmatmuharam8501 4 ปีที่แล้ว

    hello sir, I am an arduino beginner user ,, I want to use a pressure sensor with type xgzp6857 and will be processed by arduino, this sensor uses the i2c communication protocol, I have found the i2c sensor address is 0x6D, but this sensor does not yet have a library for arduino, how can I use this sensor so that the pressure reading can be displayed on the serial monitor?
    maybe you have an idea for this problem?
    thank you

  • @nicneufeld226
    @nicneufeld226 3 ปีที่แล้ว

    If we are communicating between an arduino to another arduino, how can we find the address of the arduino? this sketch doesn't work for that. Thanks

  • @ORagnar
    @ORagnar ปีที่แล้ว

    2:50 Don't you have to specify which is the clock and which is the data? Also, how do I know that the scan program is outputting to those specific pins?
    12/16/22

  • @christiancoding
    @christiancoding 4 ปีที่แล้ว

    Thank you

  • @nitinjimiwal2163
    @nitinjimiwal2163 2 ปีที่แล้ว +1

    sensor address is not showing

  • @gokulnath7914
    @gokulnath7914 3 ปีที่แล้ว

    Thank u sir

  • @3D_Printing
    @3D_Printing 3 ปีที่แล้ว

    should it start for(address = 0;

  • @JJnamedbyBelgi
    @JJnamedbyBelgi 3 ปีที่แล้ว

    What should I do if it says "Devices found: No I2C devices found" although a module is connected?

    • @richardjelinek5038
      @richardjelinek5038 3 ปีที่แล้ว

      Check cables, make sure the device isn't fried. You could have a 10bit addressing only I2C device (very exotic), that will not be seen by this scanner.

  • @K-Luxuriant
    @K-Luxuriant 3 ปีที่แล้ว

    Sir I ran it for my Arduino UNO & its showing "no i2c devices found!"... What should I do now? I'm also not able to connect BMP280 sensor!

    • @elithecomputerguy
      @elithecomputerguy  3 ปีที่แล้ว +1

      you either miswired your device, or it's broken

    • @K-Luxuriant
      @K-Luxuriant 3 ปีที่แล้ว

      @@elithecomputerguy But Sir the accelerometer sensor is running perfectly with UNO. Also when I searched for I2C with BMP280 connected, it shows its register address. I checked the wiring thrice & it looks okay. I'm actually confused on what should I do now..

    • @shaputer
      @shaputer 3 ปีที่แล้ว

      @@K-Luxuriant Some things don't work with other Arduinos. Example Oled only works with a NANO.

  • @3D_Printing
    @3D_Printing 3 ปีที่แล้ว

    2c_scanner Arduino UNO to PCA9685 16-Channel 12-bit PWM Servo motor Driver I2C Module For Arduino Robot E5 just keeps saying Scanning Scanner in more like a GUI not a text display what is wrong: Wires correct and baud rate is the same as code

  • @saskiacurls6045
    @saskiacurls6045 2 ปีที่แล้ว

    I love you

  • @richardjelinek5038
    @richardjelinek5038 3 ปีที่แล้ว

    Hm. Nice try Eli, but nope. Close, but nope. First off, you cannot iterate 1 -> 127. You omitted 0 because you probably know it's special (I2C broadcast), but it's not the only one. If you look up the I2C reference you'll see addresses 0-7 are reserved as are 120-127. So in fact, you need to restrict the scan space to the interval [8;119]. You probably just got lucky with your attached devices that they didn't go mad when receiving one of the reserved addresses. Second, you need to assume some device might get mad and lock up your I2C bus, which is why you need to implement a scan timeout as well as a I2C bus reset for a full fledged I2C scanner.

  • @nitinjimiwal2163
    @nitinjimiwal2163 2 ปีที่แล้ว +1

    Its just showing device found