How I2C Communication Works and How To Use It with Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 เม.ย. 2024
  • howtomechatronics.com/tutoria... ► Find more details, circuit schematics and source codes here.
    If you enjoy and find the content that I make useful, please consider supporting me on Patreon: / howtomechatronics
    In this tutorial we will learn how the I2C communication protocol works and also we will make a practical example of it with the Arduino Board and a sensor which uses this protocol. You can watch the following video or read the written tutorial below.
    Visit HowToMechatronics.com for more Tutorials, Tips, Projects and How It Works videos:
    ► howtomechatronics.com/
    Like my page on Facebook:
    ► / howtomechatronics
    Add me on Google+:
    ►plus.google.com/+Howtomechatr...
    Music: Aduro by Jens Kiilstofte (machinimasound.com/music)

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

  • @rahulfromkerala
    @rahulfromkerala 4 ปีที่แล้ว +290

    2 hours of reading and then here comes this video where everything is well explained in under 10 minutes... You tube is spoiling me...

  • @thesauceboss5995
    @thesauceboss5995 2 ปีที่แล้ว +45

    This is one of the only videos I've found that explains how pull up resistors can affect the speed at which data can travel on the SDA line. Fantastic video that explains how I2C works. Great job.

  • @vijaykumar-hc6jz
    @vijaykumar-hc6jz 3 ปีที่แล้ว +10

    The bit sequence was so well explained that I had to print the screenshot of it for future reference.

  • @mark879
    @mark879 7 ปีที่แล้ว +35

    Awesome video! I especially appreciated the protocol/packet breakdown. Thanks very much!

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

    Watched many videos on this protocol I was never able to grab the concept clearly and I found your tutorial and it made my life simple . Thanks man u have explained and visualised the concept neatly .

  • @kamuizero
    @kamuizero 7 ปีที่แล้ว +19

    What a great video! Very clear explanation and simple demonstration on how to use it.
    Thank you very much.

  • @RamswaroopSorencool
    @RamswaroopSorencool 6 ปีที่แล้ว +5

    This is so beginner friendly! Thank you so much. I used the same illustrations to make few students understand the same. :)

  • @elonmuskmtmt886
    @elonmuskmtmt886 5 ปีที่แล้ว +3

    This is by far the most thorough and yet still concise explanation I have found! Awesome video!

  • @GetElectronics
    @GetElectronics 5 ปีที่แล้ว +16

    I always like tutorials that show how to use sensores without relying on 3rd party libraries other than the wire one. Very useful for learning.

  • @nobodyspecial313
    @nobodyspecial313 8 ปีที่แล้ว +73

    Sweet tutorial! Really like the illustrations that went along with your explanation. After looking at a few cool project videos where people are using Arduinos and other microcontrollers, it makes me wish my college had a class on these!

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

      Dejan Nedelkovski

    • @Gupatik
      @Gupatik 2 หลายเดือนก่อน

      it's been 8 years now or so, are you still alive bud, and did you learn this arduino and microcontrollers stuff. Anyways, hope you are doing good

  • @AliHSyed
    @AliHSyed 6 ปีที่แล้ว +2

    OMG thank you so much, I've been so lost with i2c until I watched this video!

  • @OndrejBakan
    @OndrejBakan 7 ปีที่แล้ว +30

    Very useful for beginner like me, thank you! :)

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

    Thank you for this tutorial! I knew the overview of how i2c works but not the specifics. It looks similar to packets in TCP/IP.

  • @PhDFernandoCoach
    @PhDFernandoCoach 7 ปีที่แล้ว

    Thank you very much for this video, Dejan! The information is clear, well organized and dynamically illustrated!

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

    You are the best. Thank you for taking the time to explain I2C on such indepth level.

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

    Your examples are very helpful for us slow pokes with little to no insight. Good Job.

  • @morgard211
    @morgard211 6 ปีที่แล้ว +3

    Thanks! I didn't want to memorize it, but to understand it and it worked! :)

  • @michaelvogt7787
    @michaelvogt7787 7 ปีที่แล้ว +8

    Dejan,
    I was looking through youtube for a decent tutorial about the I2C bus as implemented on the Arduino. I have a class of high school students who could use a good demo. I didnt expect to find your EXCELLENT tutorial, one that would be useful even to professional electronics engineers. I wanted to let you know you did a nice job, and it was appreciated.
    Dr. Michael Vogt - North American Robotics

  • @fleshTH
    @fleshTH 7 ปีที่แล้ว +2

    This was extremely well done! Good job! It was very clear and now i'm off to do some new projects.

  • @mohanmanoharan1387
    @mohanmanoharan1387 8 ปีที่แล้ว +22

    super, really appreciate for the tutorial. Request similar other Serial protocols SPI explanation. CAN, UART. thanks

  • @danielrufenacht3722
    @danielrufenacht3722 8 ปีที่แล้ว

    Hello Dejan
    Many thanks for your time to spend in order to explain us these very clear tutorials.
    Daniel from Switzerland

  • @MkmeOrg
    @MkmeOrg 8 ปีที่แล้ว

    This is fantastic! Sharing on Mondays live show. Great vid. Cheers!

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

    SUPER helpful tutorial! Thank you so much!
    I have an ALS31313, and all the code examples I could find online (including the manufacturer's website) don't work.
    Your tutorial makes things SO much clearer and I managed to get my magnetometer working within 15 minutes of watching your video!
    THANK YOU!!!

  • @naboulsikhalid7763
    @naboulsikhalid7763 5 ปีที่แล้ว +9

    Hi, Mentor. What to say, thank you won't be enough. great, detailed video.

  • @excite236
    @excite236 8 ปีที่แล้ว

    saved me so much time working gy-80
    thanks man

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

    Excellent explanation. Also helps me in a project where I will be using breakout boards for the first time.
    Thank you

  • @ExtantFrodo2
    @ExtantFrodo2 8 ปีที่แล้ว

    I now understand what I could not understand previously. Thank you.

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

    I watched a few videos and this is the BEST explanation for I2C. Thanks

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

    Very clear and instructive. Well done. Thank you !

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

    Thank you for a clear explanation. I used only SPI to date but now I know how to use I2C ... thanks...

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

    You explain things very accurately! Thank you!

  • @MrJeppeholt
    @MrJeppeholt 5 ปีที่แล้ว

    OMG dude that was perfect. I have been struggeling with i2c for a while now but this made it click. THANKS! :D

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

    Nice, it is desirable in the following tutorials to explain the I2S protocol and what is exactly the difference with I2C

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

    Great description of I2C. Thanks:)

  • @alexpelagaggi
    @alexpelagaggi 6 ปีที่แล้ว

    Dejan Nedelkovski, you are the best. Thank you very much for making this video.

  • @mrcamperon
    @mrcamperon 8 ปีที่แล้ว

    thank you Dejan.
    great tutorials, very well done the clip too

  • @Patrick-ky7ez
    @Patrick-ky7ez 3 ปีที่แล้ว

    Amazing video. SOO many hours of reading pdfs with unnecessary tech jargon. You explained it perfectly.

  • @devarajan2291
    @devarajan2291 7 ปีที่แล้ว

    excellent.
    thanks a lot.
    you helped me in my interview preparation.

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

    дејан секоја чест! браво за споделеното знаење! сеа дознав за твојот канал, ќе разгледам што си споделил со задоволство.

  • @michaelliles6755
    @michaelliles6755 8 ปีที่แล้ว

    Finally someone who knows what he's talking about ! Thank you! Not one person on the Arduino site or any other place online have suggested hooking up scl to scl and sda to sda . Everyone says hook it up to A4 and A5 . I bought two units so far thinking that either I broke it or it was doa. well turns out that both work fine. why is this info missing from the arduino site??
    anyway thank you very much!

  • @iiDougieii
    @iiDougieii 5 ปีที่แล้ว

    Thank you for this video.
    I needed a refresh of what I already learnt in the past.
    Good work !!

  • @clearwavepro100
    @clearwavepro100 8 ปีที่แล้ว

    Thank you! This is really well done, clear and interesting!

  • @erichertsens
    @erichertsens 8 ปีที่แล้ว

    thanks, appreciated from the Dominican Republic

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

    You said 124 devices instead of 1024 devices (0:52 min), but great video it helped me alot, thanks :))

  • @chinhcd
    @chinhcd 7 ปีที่แล้ว

    It saved me so much time and hassle. Good job!

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

    Thank you brother, you help me a lot in my projects

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

    Thank you for this useful video !! You explained the topic in such a clear way !!

  • @mohamedabdalla-es6ll
    @mohamedabdalla-es6ll 8 หลายเดือนก่อน

    Thank you very much for the clear explanation.

  • @user-yw5yr4mk2c
    @user-yw5yr4mk2c 4 ปีที่แล้ว

    Good explanation of the protocols' packet. thanks

  • @Syria..
    @Syria.. 3 ปีที่แล้ว

    amazingggggg you did save me after reading datasheet for days

  • @thtr9647
    @thtr9647 7 ปีที่แล้ว

    Omg, this is so good animation. Appreciate !

  • @harshatechvideos1859
    @harshatechvideos1859 5 ปีที่แล้ว

    Nice work and thank you very much for providing these quality videos.

  • @pacokun1
    @pacokun1 8 ปีที่แล้ว +2

    Thanks, I understand how it's work now :D It's will really help me :D

  • @thomasalexander1563
    @thomasalexander1563 7 ปีที่แล้ว

    Great Tutorial,,,
    Make more ..
    Absolutely waiting for all your tutorials,,

  • @youseebruce5426
    @youseebruce5426 5 ปีที่แล้ว

    A very clean and neat explanation... I understood clearly... Thank you very much.

  • @spbains1966
    @spbains1966 5 ปีที่แล้ว

    Excellent tutorial bringing out the details very clearly

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

    So easy to understand. Thank you!

  • @igorradevski9147
    @igorradevski9147 8 ปีที่แล้ว

    Thanks Dejan for this great tutorial. It helps me a lot! :)

  • @junaidasim1021
    @junaidasim1021 5 ปีที่แล้ว

    Accurate and up to the mark explanation thank you so much

  • @druggles1
    @druggles1 7 ปีที่แล้ว

    Nice presentation along with a great explanation. Thank you, for sharing, Dejan!!

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

    Great job of explanation ! Good graphics and clear explanation of the timing !

  • @KunalGautam
    @KunalGautam 7 ปีที่แล้ว

    Thanks, it helped me a lot to understand how I2C works.

  • @glikar1
    @glikar1 5 ปีที่แล้ว

    Thanks, very good in depth tutorial!

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

    To the point, simple and clear, well done! which most people struggle to explain.
    ~This is coming from a Professional Embedded engineer.

  • @andrebernardmennicken4685
    @andrebernardmennicken4685 6 ปีที่แล้ว

    Verywell explained, clear, direct to the point, Thank you...

  • @arvydasstankevicius5277
    @arvydasstankevicius5277 5 ปีที่แล้ว

    So well explained!!! Thanks. Subscribed.

  • @lxndrskv
    @lxndrskv 6 ปีที่แล้ว

    Thanks man, I appreciate the video. I wonder what kind of issues you could run into if you ran 1024 10 bit devices on the same line. Electromagnetic interference may become a concern.

  • @ramazans8114
    @ramazans8114 6 ปีที่แล้ว

    Thanks, really very clear explanation and very effective.

  • @aragonv1
    @aragonv1 8 ปีที่แล้ว

    ΤΗΑΝΚ ΥΟU.. ! A VERY CLEAR EXPLANATION OF i2C DEVICES

  • @mikelemon5109
    @mikelemon5109 8 ปีที่แล้ว

    Awesome tutorial thanks a lot where have you been where I didn't understand that communication at all.

  • @victorchan8685
    @victorchan8685 8 ปีที่แล้ว

    Appreciate for your excellent video, you speak very clear and explain in detail! You are wonderful! Help a lot!

  • @SathishKumarbalu
    @SathishKumarbalu 8 ปีที่แล้ว

    Nice ! Now i got a clear idea what is I2C.

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

    Thank you for that simplified explanation :)

  • @georgekontellis3856
    @georgekontellis3856 6 ปีที่แล้ว

    Great work. Can we also see somewhere the procession of raw data into actual measurements?
    Do you use the sensor's librarys for that?
    We want to connect a CO2 sensor, a humidity sensor and two accelerometers. Also a BMP180...
    Thank you...

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

    This channel never gets old

  • @TurgutSaricam
    @TurgutSaricam 6 ปีที่แล้ว

    This is an amazing tutorial. Thank you very much.

  • @expectropetronus
    @expectropetronus 7 ปีที่แล้ว

    Simple and lucid explanation... Thank you

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

    Nice Work! Very clear and simple explanation!!

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

    This was an informative and helpful video. I also liked how you explained with graphics. It made things easier to understand.Thank you and please keep doing more videos like this for beginners like me. Best regards.

  • @abdelrhmansafwat6191
    @abdelrhmansafwat6191 6 ปีที่แล้ว

    Thank you very much buddy for your great illustrations :)

  • @PiCoVienna
    @PiCoVienna 6 ปีที่แล้ว

    Excellent, easy to understand, very precise!

  • @andremendes5116
    @andremendes5116 7 ปีที่แล้ว

    Nice explanation... the protocol I2c is very usefull, fast and need... Thank's for your time and information.

  • @iconofsin1043
    @iconofsin1043 7 ปีที่แล้ว

    Very well explained, thank you very much!

  • @krozareq
    @krozareq 10 หลายเดือนก่อน

    Good to know how all this works. I've used the Linux i2c and SMbus userspace tools, but never really knew the hardware functionality behind it. GPU lighting is generally i2c and motherboard controllers use SMbus (both very similar though). Knew just enough to be dangerous and change RGB colors or monitor temps with a very light shell script and even shell functions. The OpenRGB project has the addresses for most hardware, including USB (mouse, keyboards, and some mobos use USB for communication to controllers).

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

    Utterly informative video much appreciation 👍

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

    Very good and clear explanations! well done!

  • @fahmywaleed
    @fahmywaleed 5 ปีที่แล้ว

    Thanks for a great explanation. Would it be possible that you do a video of how the arduino commands on the IDE are converted to signals on the wires. I feel there is a disconnect between the protocol explanation at the beginning and the arduino program. Also if you can add a link to the other video that you mentioned as completion to this one

  • @BigyanChap
    @BigyanChap 6 ปีที่แล้ว

    I2C Communication -- Demystified! Thumbs up.

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

    Thanks for the great explanation. I see that the addresses for the I2C devices are predetermined by the manufacturer, so is address collision a common problem that you have to deal with when using this interface?

  • @marklowe7431
    @marklowe7431 8 ปีที่แล้ว

    Perfect explanation. Thank you.

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

    superb video mate. Explained it very easily.

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

    Thank you very much for this detailed explanation. You made this topic easy to absorb. 🐣

  • @IRgEEK
    @IRgEEK 6 ปีที่แล้ว

    Great and informative video! Thanks so much!

  • @leuc2475
    @leuc2475 11 หลายเดือนก่อน

    Thank you. It's simple to comprehend

  • @MathewPendleton
    @MathewPendleton 7 ปีที่แล้ว

    explained perfectly. thanks!

  • @narendravasu6607
    @narendravasu6607 6 ปีที่แล้ว

    Thank you sir
    Your explanation very simple and clearly. Very useful to me . onces again thank you sir

  • @vaibhavgirdhar5289
    @vaibhavgirdhar5289 7 ปีที่แล้ว

    Really awesome and helpful video!
    Dejan how do you learn about all this stuff?
    can you recommend some books or info sources regarding MPU 6050 and other sensors.

  • @lyriz
    @lyriz 7 ปีที่แล้ว

    Very very good tutorial! I'm just wondering how you set these addresses? Are they already set on the devices or do the devices have inputs to set them?

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

    very very fantsatic explaination,.. thank you so
    much bro..

  • @alentech6091
    @alentech6091 7 ปีที่แล้ว

    Amazingly well explained!