I2C with Arduino and Raspberry Pi - Two Methods

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024

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

  • @Dalamain
    @Dalamain 5 ปีที่แล้ว +86

    This is the best channel for IoT devices, soo much detail and clarity - amazing tutorials, thank you!

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

    Hello ! I'm french and I think you are the best youtube channel in english to explain electronic simply ! It's clear and understandable ! 👍👏 Thank you for your work ! ( Sorry for my english if I make a mistake ) 😁

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

    Thank You for covering this subject. I was having an issue powering/grounding an IoT project that has an UNO R3 connected to a DHT11 with 2 way communicating with an ESP8266 that is connected to wi-fi and a 4-way relay. The 3.3/5 volt common grounding was giving me a head ach, and causing issues with the sensor data transmitting continuously. No one else really covers things as well as you do. AWWWsome and thank you again.

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

      i am having a similar issue im unable to make the esp32 slave.........may be its because of common grounding

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

    I would like to see a comparison video on using UART vs i2c vs SPI, etc... As means to establish communication between an Arduino and a Raspberry Pi (or between 2 arduinos and etc). As a quick guide on why should you use one protocol over another one for your project.

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

    Again an excellent and easy to follow instruction video! Looking forward to I2C part 2!

  • @charlieangkor8649
    @charlieangkor8649 3 ปีที่แล้ว +7

    Imagine in the year 3070: I have Raspberry Pi with 3.3 V I2C and Arduino with 3.3 V I2C, but Arduino is made out of antimatter and Raspberry Pi from matter. Incompatible. Need a special wireless conversion module with a ton of millitary grade safeguard systems to prevent me from blowing up the whole city in a nuclear detonation should these two accidentally touch on my benchtop.

  • @tubeDude48
    @tubeDude48 5 ปีที่แล้ว +8

    I'm impressed with your presentation's. I also follow Mr Carlson's Lab. Your are both clear and concise.

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

    Glad to see you're back with your superbly detailed videos. Now I'm anxious to get my Pi talking to my Arduino. Also looking forward to the installment where you address increasing the distance I2C can be used over. Great work Bill. Top notch TH-cam presentation.

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

    once again learned something with joy. great explains how to connect a raspberry pi to an arduino Thank you from Germany

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

    I give you the award for the best video explaining I2C and warnings for I2V Bus 0 and voltage considerations. If you find yourself in East Lansing, MI I will present the Award to you at the local brewery. Nice job, I like you video technique and editing hope you don't mind if I copy parts of that technique. Keep broadcasting!!

  • @quaternion-pi
    @quaternion-pi 5 ปีที่แล้ว +4

    Another excellent, useful, educational video. Awaiting part two.... Thanks!

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

    Loved the episode. Looking forward to the next I2C episode. THANK YOU for making these.

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

    You are genius.Your detailing and way of description is just marvelous. If you can make some videos related to some basic electronics, It would be so useful for laymen like me.

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

    great tutorial, thanks a lot!

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

    Absolutely Love your Workshop!!
    Keep up the Good Work :)

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

    always a concise explainer. Thanks heaps. Keep up the amazing videos.

  • @vincentcaudo-engelmann9057
    @vincentcaudo-engelmann9057 2 ปีที่แล้ว

    Super high quality instruction. Thank you for this video.

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

    nailed the camera transitions *thumbs up*

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

    Thanks, I just ordered a five pack of the converters.

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

    Very nice and professionally prepared.

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

    Thank you for the good I2C explanation

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

    Great video. Didn't use the Arduino as a master and raspberry as a slave.

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

    You are amazing,your videos are very much usefull to me,keep it up don't stop your tutorials,thank you so much🤖

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

    Just trying to connect an ESP32 (3.3V) and arduino. That was a perfectly timed video :D Thanks!

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

    These are the most easily understood and trustworthy tutorials I have seen. I'm trying something similar but unsuccessfully so far. Does an Arduino Nano have a 5V I2C pull up? Specifically, can I use an Arduino Nano (5V) slave with an ESP8266 ESP01 (3.3V) master without a Logic Level Converter?

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

    Thank you for your video. It helped me a lot.

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

    Helpful video 👍 Thank you

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

    I would love to see a video how to have one Raspberry Pi (master unit server that does all the processing) and then multiple Arduino clients (over ethernet, they work as actuators; they send sensor data to rapsberry server and raspberry then sends data back on what port to turn on)

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

    I2C on a Pi Pico would be interesting. That's the route I'm trying to follow - after I understand I2C a bit more.

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

    God Bless you, thank you very much for sharing your experience and knowledge with us, you are a great tutor

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

    Did you ever do that third I2C video you mentioned here? Your I2C playlist only has two videos in it...

  • @minhtruong9408
    @minhtruong9408 5 หลายเดือนก่อน

    Thank you so much for the information

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

    Appreciate all the hard work you do.

  • @admiretechnologies1218
    @admiretechnologies1218 5 ปีที่แล้ว +2

    I'd love a video Arduino --> Jetson Nano communication with I2C.

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

    I love this python code I haven't gotten into it much but I guess its going to be inevitable in this design plus it increases code knowledge cool ! Thanks for illustrating that you can have a free flowing design and integrate many things all culminating to make an awesome robot like db 1 is 😁👍

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

    This is just what I needed to know. I'm about to use I2C between a RPi 3B+ and a D1 mini (w/motor shield for a stepper motor. Thanks for those videos, too.). Are there any gotcha issues that I should know? Looking forward to your next I2C video.
    Thanks! 😎

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

    Thank you! It was really helpful and informative. I also think educational and scientific could be a little more smiley ;)

  • @m.a.sherif6878
    @m.a.sherif6878 4 ปีที่แล้ว +1

    don't really understand what these addresses are, where did you get them from or how do you know that is the address you are trying to access, can they be anything else like 0x9 for example. How do they actually work? . In the python program you had 0x0 and 0x1 where did you get them from or are they just simple address variables that can be declared/set to anything you want.

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

    I really love this Guy.

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

    Awesome Video!

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

    how does raspberry differ from being master to slave in the first and the second setups? Moreover, I couldn’t fully understand why we shouldn’t you use any other i2c device while we connect arduino and rasp?

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

    hey i would love to see an video on the use of rs485 communication between arduinos. hope you can add it to your list

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

    Can’t wait for multi master/slave video

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

    very educational,thank you.

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

    Great explanation!

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

    thanks for all.

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

    Interesting video, thanks a lot for the information..great videos.. thanks a lot!...

  • @DiegoDeRosa-y4x
    @DiegoDeRosa-y4x ปีที่แล้ว

    Hello. I was able to connect the Raspberry pi 4 (Master) to arduino uno. It works perfectly. But when I want to install the 7inch touchscreen from Raspberry Pi, AND the arduino via i2c, there is a conflict and it stop working... Are there any clues you can share for this situation?. Thank you very much!

  • @DiegoDeRosa-y4x
    @DiegoDeRosa-y4x ปีที่แล้ว

    You channel is amazing! I learn a lot from you. I am trying to send a string from a Raspberry pi to Arduino 1. Do you have any special advise for it? Thank you!!!

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

    I have really appreciated all your videos!! Any advice on how to set up the RPI as the slave? I can’t seem to find any examples on how to do that. I have the logic converter connected, but can’t get the code working.

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

    Did you actually upload the video on using multiple i2c masters and extending the bus? I can't find it. BTW I love your videos.

  • @henrikjensen3278
    @henrikjensen3278 5 ปีที่แล้ว +2

    Your connections are wrong (Do not connect the 3.3V pin). There is a reason the converter board is marked Vin and 3V3 (At least mine are). The converter board cannot power the PI from the Arduino power supply.
    The converter board has two mosfet and a 5V to 3.3V regulator and it is that regulator that has output on the 3.3V pin.

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

      Can you put link for your board?

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

      It is just a random Ebay board and looks exactly like the red ones shown.
      I do also have some 4-way boards, they do not have a regulator on-board and need both 5V and 3.3V supplies.
      The way you work it out is number of 3+ pin parts: Same as number of IO=no regulator, needs both voltage. One part more than IO=With regulator, do not connect 3.3V.

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

      I think you bought some unidirectional ones as bidirectional ones dont have input and output specified as stated in the video

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

      Look at the board, it has two mosfets and one 5V to 3.3V regulator, mine are exactly the same.

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

    Great tutorial my frind u helped me so much, bis später

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

    @ 28:00 you mention another i2c video that would be out in "a couple of weeks" but a search through your channel didn't turn up the video, was it ever made? The proposed topics are of interest for a project I am working on. Thanks!

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

    Hello, I'm new to coding my skills are mostly in hardware. But I was wondering If I'm controling over 30 relays from the arduino how do I control them through the raspverry pi using a web server page from the pi itself?

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

    Cool work

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

    Would like to have seen requests like we do with arduino to arduino.

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

    PLEASE HELP, WHICH VERSION OF PYTHON IS HE USING? I used 3.9.0 and it doesn't recognize the smbus and also the smbus2

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

    Assuming you don't need to use a HAT, you can *easily* use the i2c-0 bus for your own projects. It takes about 2 minutes to configure, and then you're off to the races with TWO i2c buses for your project(s). I've been doing it for years. Here are the steps I have been using for several years now, ever since the RPi2.
    pastebin.com/ibvnFVqc

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

    Great video! What about connecting say 2 Arduino as slaves to a Pi as master, do we need that LLC?

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

    Thanks

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

    I have no trouble sending data from pi to arduino or from arduino ot pi but I cant work out both, I need 2 way communication, what would I need to change to get this going. simply adding the read and write commands to both causes either a communication error or causes the arduino to power cycle

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

    I got a question...if i want to use them in a portable project and i will use a battery pack probably where should i connect the battery and how and what voltage should the batteries output ?

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

    Did you make the video about extending the I2C range?

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

    Excellent!

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

    I wilder how much traffic can this bus handle?

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

    My absolute heartfelt thanks for your incredible contribution.
    I am looking to setup a project and after doing a lot of research on the subject i've decided to go with a single rpi connected to multiple arduinos slaves over i2c . So is there any way to do that and how to connect more than an arduino board????

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

    Can you wire a Pi Motor HAT directly to an Arduino by just connecting the corresponding I2C pins (A4 & A5 to pi 3 & 5) ?

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

    Can we connect 5v operating sensor to Arduino while using i2c

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

    hi please make video for the foward and inverse kinematics for robotic arm

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

    Thank you a lot!! Very good. :-)

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

    Hello,
    Thanks for great tutorials.
    I have a question on the logic level converter.
    i have two arduino boards (Nano and Nao 33 IOT) they operate at different voltage levels.
    how can we do serial communication between these two boards ? will the I2c level convertor work in this scenario or i need something else?
    Regards

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

    Can this be used for two way communication without the logic converter as long as the Pi is the master? So the Pi can send a request and get data back from the Aurdino. Seems like it should work since the pins are pulled low to send data and the only pull up is in the Pi but I'm not sure and don't want to destroy my pi.

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

    Hi!
    I don't know your name, I've been searching but I have not found it...
    First of all, you're a very good teacher!!!!
    I've have a question... The smbus library on the Raspberry Pi BLOCKS the program execution until it has transferred the whole data. If you use the serial channel it does not happen in this way. For serial, you write, the function returns, and in the background the transmission takes place.
    It is a great inconvenience, thus the program can do nothing that waiting for the transmission.
    The only solution I've found to avoid this situation is to build a socket server, place on it the communication, and call this server in other programs. In the case the program is a web page the solution is good, but I don't understand why the smbus library has been designed in this way.
    I've tried to place the i2c communication in a separated thread in the same program, but it does not work...
    Sorry for my English.... I'm spanish.
    Congratulations for your videos!!!
    Thaks!

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

    Congrats on the video, it is very helpfull. However I have some questions about many I2C devices. If I want do connect 2 arduinos into the raspberry Pi, I stiil can use 0x8 as a slave address on both arduinos? Or i need to use 0x8 on one arduino and another address (idk which address) on the another? About the phisical connections, I Still use the same pins on the rasp/arduinos, right?

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

    do a video on stm32 board plz

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

    Thank you ❤

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

    Any future plans on making a tutorial on using an Arduino as a Master and a RPi as a Slave?

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

    Hello,
    I've watched all your videos about I2C protocol and I'm trying to send data from arduino to my raspberry pi but it's not working
    every time I try to send data from my pi to arduino works fine but when i try to read a block of data or even a single byte it's not working at all and gives me error or gives me trash data, Can you help me please 😊!

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

    will a pico work as a peripheral using the arduino ide?

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

    13:44 Is there a way I can measure if a device uses pull up resistors with a multimeter? I'd like to use a pi to interface with a 5V device, and if possible, I'd like to do that without a logic converter.

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

    Hi, do you have a guide on connecting multiple slave arduino from master raspi ?

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

    Thanks for the Video sir - great explanations however in terms of your connections - i am not clear on arduino usb connection.Do you have the arduino separately connected to pc via usb?

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

    Is there a good I2C GPIO breakout board for analog inputs? I would like to wire up lots of potentiometers (minimum 26) and a bunch of switches (minimum 27)...

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

    Is the logic converter necessary? Why not just run the arduino at 3.3v?

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

      I know you can’t make it run full speed clock but should still work.

  • @HalilouIlboudo
    @HalilouIlboudo 4 หลายเดือนก่อน

    Bonsoir Monsieur j'espère que vous allez bien? je travail sur la communication i2c Raspberry Arduino mais j'ai un souci avec les transfère des données avant d'utiliser votre solution quand j'exécute le programme la carte arduino reçevait les données envoyer par le raspberry mais le raspberry à son tour ne reçevait pas les données envoyer par l'Arduino mais après avoir suivit votre video j'ai compris que le problème c'était le niveau logique donc j'ai payé un convertisseur de niveau logique et l'utiliser mais je n'arrive meme plus à reçevoir les données sur la carte arduino. Avez vous une autre solution à me proposer ou pensez vous que le problème vient de mon convertisseur?? merci d'avance

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

    can someone please explain 13:46 for a dummy, what does he mean by pull up resistors that will pull the line up to 5V? I mean, isn't the arduino itself is pulling the line up to 5V?

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

    Hi there. Is this more reliable than connecting the RPi to the Arduino via USB serial? I have been using that arrangement and once in a while, the arduino changes its address (ACM0 becomes ACM1). I am thinking this might be a more robust connection.

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

    Love to watch this channel and one of the best instructional videos. But where can you purchase "a handful" of bidirectional converters for a "couple dollars" ? I'm finding one sells for $10 with shipping (Adafruit, Sparkfun) .

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

      On Ebay you can buy a pack of 10 for $2-3 . From 2-8 pin converter.

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

    It is possible to do the same on (RPI Zero w & Teensy) or on (RPI Zero w & Arduino Nano) ?????

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

    How do load cell or strain gauge work???
    Can we get a video on it

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

    any plans on finishing the part 3 of the Google AIY series? Thanks

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

    but what if i want to send strings? how can I do? can you give an example?

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

    what are you using to hold up the pliers and stuff?

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

      There is a tour of the workshop where everything is described about all the storage solutions.
      th-cam.com/video/n838ifEFGTk/w-d-xo.html
      Follow the link and you will have your answers and lots more.
      Have Fun,
      Joe

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

    "and because 3.3 volt is higher than the threshold" - logical error already. The 3.3 V output doesn't guarantee to generate a level at least 3.3 V.

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

    I checked on both my Arduino's (a Jade and another one) and the SDA and SCL stay at 5V, so they have pullup resistors to 5V. Beware! Its is always best to use a logic level shifter, damage is irreversible to poor pi's. I really don't understand why they chose 3.3 V for I2C on these

    • @TuanAnhNguyen-mn6yx
      @TuanAnhNguyen-mn6yx 2 หลายเดือนก่อน

      I think its bc of the library code, in the function, all the code were set to pull up on SDA and SCL for easy use, just go to registers level for better control

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

    Can Raspberry Pi and Raspberry Pi Pico can be connected?

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

    super thx

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

    Hey sir, I have some problems, may you help me?

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

    Can anyone point me to the right way to send an array from arduino to raspberry pi over i2c? Sending from the py to arduino works as intended.