#148

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

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

  • @digihz_data
    @digihz_data 5 лет назад +5

    Excellent explanation as always.
    Love the way you explain things, and mixed with a bit of serious humour.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Very nice of you to say, Hans, thank you for posting.

  • @phillkelley7700
    @phillkelley7700 5 лет назад +1

    The process of converting a channel number to a bit position implies that the chip can be configured to send the same information to multiple downstream devices. The best example I can think of is a cash register where you want to show the same information on both the operator and customer sides. The data sheet confirms that the chip will do this. Overall, a fascinating video about a problem (ID clash) that I’ve never had to deal with but which raises all kinds of possibilities. Thanks.

    • @RalphBacon
      @RalphBacon  5 лет назад

      I also wondered about that, Phil, and I felt the datasheet implied that it's perfectly legal to send the same information or command to multiple I2C streams. I wasn't going to mention this and confuse people as I had no real case example but you have most definitely given one. Could be useful in sending data, not so much in receiving data from sensors though!

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

    Ralph, thanks again for another informative video.

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

    Thanks for video I found this device from a member of MERG and as I wanted to use 2 x 128 x 32 Oleds on a Headboard on a Signal Gantry it was just the job as address is same on each Oled, just waiting for PCB from our favourite JLCPCB to arrive so I can build using a Nano and a switch case sketch as I need just a "P, B and T" on each Oled when certain points and signals are triggered ...Cheers John

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

      Thanks for sharing, John, I'm very happy this video helped in a small way 👍

  • @williammiller7543
    @williammiller7543 5 лет назад

    Another great and informational video. I looked at I2C in the past for placing some sensors around the house and quickly found that the length of the I2C bus is very limited. It gets very complicated but I usually limit my wire lengths to 1 meter,

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Yes, the I2C, even at the lowest 100KHz speed is limited in length, William. Using shielded cable can help (the shield is grounded around both clock and data) but then timing issues can arise. Best to use a simple nRF24L01+ sender for longer range stuff around the house - or even a simple LoRA node if it's right down the bottom of the garden!

  • @bollie9752
    @bollie9752 5 лет назад

    I just watched #28 and #30 and did a quick count: Congrats with 150 video's !!

    • @RalphBacon
      @RalphBacon  5 лет назад

      I appreciate the sentiment, Bollie, but you're premature!
      The first two "videos" were just tests to see what this RUclips malarkey was all about. Then I did an unnumbered video last November just to let everyone know I was out of action due to my eye surgery, so that doesn't count. However, that is so far in the past I'm definitely counting this Friday's video as #149 and next week will be - tada! - video #150. Party time!

  • @BaronVonBiffo
    @BaronVonBiffo 5 лет назад

    Good video. Worth staying to the end for the bit manipulation explanation.

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Glad you thought staying to the end was worth it! Could be the same with next week's video too... (no spoilers)

    • @BaronVonBiffo
      @BaronVonBiffo 5 лет назад

      @@RalphBacon :D

  • @wires4auto
    @wires4auto 5 лет назад

    Thanks Ralph! Just bought 1 from AliExpress for 92p so so so cheap! No idea when I'll get time to use it but I know I'll have it to use. Great video btw

    • @RalphBacon
      @RalphBacon  5 лет назад

      That certainly is cheap, Gordon, you have an eye for a bargain, obviously! Thanks for posting.

  • @CharGorilla
    @CharGorilla 4 года назад +1

    Great video on how to use the TCA9548A I2C multiplexer, If I had a need to use one of these it'd be a real time-saver and explains everything in such straightforward terms. This is one of the best written tutorial videos I've ever seen.
    But seriously, what is it with firmware engineers and their love of confusing the starting index between 1 and 0.
    So when setting the bitmask at 27:27, "((1

    • @RalphBacon
      @RalphBacon  4 года назад +1

      I hear you, Adam! I've been a professional developer all my (long working) life and it is annoying. Even today, in C/C++ when you declare an array, you state int myArray[10] which means you can store 10 items in that array _starting at zero and ending at 9_ - how many hobbyists start at 1, end at 10 and cause memory corruption? Some languages even allow a SET BASE to either 0 or 1 to "get around" this inconsistency but that confuses everyone. So, it's not just you.

  • @mrroobarb
    @mrroobarb 5 лет назад

    Another great video Ralph. Might be worth noting that I2C requires a common ground - not a problem for this set up, but if using say multiple Arduino's then ground must be connected between them. Keep up the good work!

    • @RalphBacon
      @RalphBacon  5 лет назад

      Good point you raise there, Bruce, thanks for mentioning it. Glad you liked the video too!

  • @UpcycleElectronics
    @UpcycleElectronics 5 лет назад

    26:00
    I'd love to hear more about the nuts and bolts of what you're able to do with eclipse in order to decipher how a library works. Seriously! I've spent the last 3 days trying to get a cheap little display running.
    A Chinese store is selling a little ST7565 based display for less than $1.50 each. Someone posted a list of basic register commands, and the seller posted pictures of the working device along with the LCD ribbon pinout with SPI connection. I ordered a few, etched a couple boards, and figured I would take on a challenge. A challenge I'm well aware, is way over my head. I have several library examples that work with ST7565 controllers and a few other working ST7565 based displays to mess with. The biggest difference is that the mystery display is smaller in size than the typical 128x64. I have spent quite awhile trying to understand Oliver's U8G2 Arduino graphics library since he supports several ST7565 implementations and has readable commented code. However I'm not super familiar with Cpp and could really use a solid example and better methodology for dissecting a complex library. I'm sure it would greatly improve my understanding.
    You are the king of breaking down code like this in a practical and useful way.
    ...anyways...it's just a suggestion from a single subscriber/viewer. I'm sure you have a long list of projects to film and don't have time for random content suggestions. I don't take such things personally. I was simply intrigued by the hint of a better methodology for achieving my current goals :-)
    Thanks for the upload.
    -Jake

    • @RalphBacon
      @RalphBacon  5 лет назад

      I learned the hard way _never_ to buy hardware that wasn't supported by something, ideally a working example but failing that at least a decent datasheet. This applies 100x to displays; the number of hours I've spent with a white screen cannot be counted; only to find a single byte of data was "wrong" but not finding that until someone else had (partially) cracked it.
      Eclipse doesn't help you get a display (or any other component) working in that respect. What it allows is easy drill-down into the supporting libraries so the code is right there at your fingertips rather than having to open (yet another) file in Notepad++ or the Arduino IDE which is very slow to open anything in the first place!
      Additionally, the Eclipse IDE will immediately tell you if you are using a function incorrectly - something the Arduino IDE only tells you at compile time. It has Intellisense to it prompts you with all the necessary parameters and types.
      It's a right b****er to install (sometimes) although it's getting _much_ better these days. The best way is to try it and then figure out what Project, Tool Chain Editor and the suchlike all mean. It's more-or-less documented at Jan Baeyens' website but it does require some work and patience - and Googling!
      The best way to find out if it's for you is to try it! Just don't ask me for any help!!! Good luck!
      eclipse.baeyens.it/

  • @borayurt66
    @borayurt66 5 лет назад

    Great video as always! I did not know this chip, already ordered one to keep at hand. Thanks!

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Have fun with it, Bora! Thanks for your post, always good to hear from you.

  • @montpierce424
    @montpierce424 4 года назад

    Fantastic Video!!! I'm also very pleased to see some code written in something other than Arduino's Sketch, which is very inefficient, especially for Port I/O. I use Atmel Studio myself, which is a FREE customized version of Microsoft's Visual Studio.

    • @RalphBacon
      @RalphBacon  4 года назад

      Glad you liked it, Mont Pierce! DId you see my video on the PRO IDE Arduino will be bringing out this year? It could give Atmel Studio a run for its money (although if you like Atmel Studio, stick with it).

  • @theboringbrit1757
    @theboringbrit1757 5 лет назад +3

    Thank you. great video as always.

    • @RalphBacon
      @RalphBacon  5 лет назад

      As always? Really? Thank you so much, I appreciate your support, Steve, nice to have you along for the Arduinite journey!

  • @georgestewart5879
    @georgestewart5879 5 лет назад

    Great video Ralph, think I got most of that. Keep up the good work, thank a lot.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Thanks for that, George Stewart, nice to hear from you.

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

    Merci beaucoup pour cette vidéo ! J'ai reproduit les 2 sketchs qui fonctionnent à merveille et même si j'ai eu du mal à adapter le second, j'y suis parvenu ! Mais ça ne vient pas de vous, je suis juste débutant avec Arduino !

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

      De rien! Je suis très heureux que vous ayez trouvé la technique utile. Merci pour votre visite! 👍

  • @flemmingchristiansen2462
    @flemmingchristiansen2462 5 лет назад

    Interesting little thing, good find and great explanation, thank you.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Thanks for that, Flemming Christiansen, nice to hear from you.

  • @avejst
    @avejst 5 лет назад +1

    Nice Component
    Thanks for sharing this :-)

    • @RalphBacon
      @RalphBacon  5 лет назад

      Thanks for your post, Asger Vestbjerg, good to hear from you.

  • @tonyeezi7315
    @tonyeezi7315 5 лет назад

    Great video as usual Ralph, I'm looking at one of these for my multi-input battery charger where each input has its own LCD showing power, etc, six in total.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Remember, Tony, that the LCDs I showed (basic 16 chars x 2 lines) do allow different hex addresses without a multiplexer, from 0x70 to 0x78 (so 8 device addresses in all). If you need more than that (but you say six) then you will need a multiplexer. Thanks for your kind words and for posting.

  • @mr.bianchirider8126
    @mr.bianchirider8126 5 лет назад

    Thank you for the detailed explanation.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Thanks for that, Mr. BianchiRider, nice to hear from you.

  • @robertparenton7470
    @robertparenton7470 3 года назад

    Thank You! I need for my Drone project and order three from Amazon.

  • @Thomas72B
    @Thomas72B 5 лет назад +2

    Thank you. great video !!!

    • @RalphBacon
      @RalphBacon  5 лет назад

      You are most welcome Thomas, I'm glad you like the video. Great to hear from you.

  • @michaelhyde9971
    @michaelhyde9971 5 лет назад +1

    Great video. Now I think I understand.:)

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      I'm sure you do understand, Michael, and if you ever get the opportunity to try this out it will become crystal clear! Thanks for posting.

  • @prob17
    @prob17 5 лет назад

    Very clear explaination thank you.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Thanks for that, Paul Robertson, nice to hear from you.

  • @seandreyer4935
    @seandreyer4935 4 года назад +1

    Hi Ralph.
    You do stunning work with this channel.
    With New Zealand in full lock-down due to the Covid 19 virus, a great opportunity for me to go through your channel and do some playing.
    I am currently working on a project that requires 3 HX711 modules. I would really like to pass them onto a I2c mux such as this TAC9548a.
    Having a fair bit of trouble finding info on doing this. Thinking if I can address the SD"x" and SC"x" as the DOUT and SCK for The HX711 I will win. Any suggestions would be much appreciated.
    Stay safe and please continue with your most informative videos.
    Cheers.
    Sean

    • @RalphBacon
      @RalphBacon  4 года назад

      The HX7111 is not I2C conformant, Sean, so is unlikely to work in the manner you suggest (unless you have a few hundred hours to spare). A board like this one, www.sparkfun.com/products/15242 does offer a true I2C interface for the HX7111 so I would expect you to be able to multiplex three such boards in minutes using the TCA9548A. Cost might be a factor as they are not exactly cheap, but you may find cheaper suppliers (or even equivalent boards out there).

    • @seandreyer4935
      @seandreyer4935 4 года назад

      @@RalphBacon Hi Ralph.
      Thanks for your input. I so far have a workable solution. As luck would have it, you can connect all the clock pins together. This has freed up some pins on my D1 MINI. It also allowed me to move the data pins arround as some positions produced more noise than I was happy with. For your info, now have clock on D5. and the 3 data lines on D6 to 8.
      I will when I can get one shipped try to run the signals to a shift register then to a single HX711.
      Plan on giving a 74HC595 a try for this.
      Keep up the Great work and thanks again.
      Cheers.

  • @almostanengineer
    @almostanengineer 5 лет назад

    I do love LCSC, such a range of components, at decent prices too, just need to remember that they shutdown for all Chinese Holidays 😣

    • @RalphBacon
      @RalphBacon  5 лет назад

      Indeed, Daniel, I suspect that they will all be returning tomorrow, Monday. I like them too, and the prices are very low indeed, it's the shipping that is always the lion's share of the cost, hence it makes sense to order as much as you can reasonably afford in one go!

  • @palaolsen9016
    @palaolsen9016 2 года назад

    Hi! I love your videos - sadly I just discored them lately.
    Anyhow, I browsed throught the comments, and I couldn't see any regarding pullups on the slave channels - which are required, and not included, neither on the chip itself, or the Adafruit board. (Didn't think there where any on the LCD-controller either.)
    Maybe thats the reason for some of the commented problems...

    • @RalphBacon
      @RalphBacon  2 года назад +1

      Oh no! Where have you been, Pål, there are many videos here! 😯
      Regarding I2C pullups (10k is normally enough) you have to be careful because vendors always seem to add them to their (device) boards with the result that the bus can no longer pull the lines low - just a single resistor on each line is enough.
      However, if as you say, there are NO pullups at all then we need to add them - with caution! Good point you make, thanks for the heads-up 👍

  • @kendrickapps674
    @kendrickapps674 5 лет назад

    You can run more than 8 chips if you want to by linking them in a cascade so example you have one primary chip then you could attach 7chips per 8 i2c channels. Why that would be needed I don’t know but it is possible.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Yes, you can, Kendrick. But, like you, I don't know _why_ someone would want to do that but I bet someone, somewhere, has a need!

  • @1over137
    @1over137 2 года назад

    This stops being needed when you move beyond the Arduino of course. Having 3 or 4 independent I2C buses available kinda negates the need. I suppose if you are adament you want to use the Ardy this device moves the problem into hardware and saves you having to bit bang software i2c on GPIO pins.

    • @RalphBacon
      @RalphBacon  2 года назад

      Well, the Arduino is still aimed fairly and squarely at newcomers, kids and hobbyists who just want a simple sketch to do something! So extending its capabilities with this little bit of hardware keeps them in the Arduino camp (where they feel comfortable) for longer.

    • @1over137
      @1over137 2 года назад

      @@RalphBacon No argument with that. I mean I started with the ardy (well the PI). If anything I found it's simplicity sometimes a little dishonest, but it tended you into producing sloopy code as it was generally forgiving. For newbies the main issues I see are not the first step which the arduino does really well in single purpose sketches. Its when they come to step 2 and combining multiple sketches into one project. That step, because of the C++ nature can be forbidding and once things start into multiple compilation units and multiple loops the real nastiness of C++ will surface and... the Arduino IDE (and framework to less degree) will start to get in the way and be in adequate.
      Where I think the future for the newbies lies, is back with the Raspberry PI that arguable started the whole "trend" with the PI 1 and 2. The MCUs there are fast enough to introduce Circuit/MicroPython and other "VMs" which open newbies to much higher level more forgiving and supporting languages. No hope for performance, but thats not always the aim.

  • @ruizhang2269
    @ruizhang2269 11 месяцев назад

    Hi Ralph thanks for your wonderful Video! May I ask you if you have any idea about TCA9548APWR which is from Texas Instruments? what is the difference between TCA9548APWR with the one you use in the video? Again Thanks for your excellent explanation!!!!

    • @RalphBacon
      @RalphBacon  11 месяцев назад +1

      Many chip manufacturers can legitimately produce the same chips (presumably under licence). Think: 741 op amps, 555 timers, 74x00 logic circuits. But not all (generic) chips are always equal. And thus may not perform the same.
      However, all chips should at least conform to the original data sheet so one circuit can/should take any manufacturer's chip of the same name.
      And if one manufacturer manages to get the leakage current down to 2μA rather than the expected 10μA, then so be it. Their chips will be more sought after, making them more profit.
      Companies making products with a particular chip will doubtless use chips from several manufacturers, if they can find them, to mitigate any single-sourcing issues (availability, cost, technical problems). This is known as second (or third, fourth) sourcing.
      In the hobbyist arena, I would not expect any particular circuit to be so critical of a particular manufacturer's chip; use the one you can find but just be aware that some chips are made by companies who have not officially licenced their production and are just in it for the (black market) money. These chips that may have issues. I have several nRF24L01 chips that are probably counterfeit (unlicenced) and perform poorly, although the manufacturer of the hobby board is probably unaware of this; he just bought some "cheap" nRF24L01 chips and put them on a PCB! Caveat emptor!

    • @ruizhang2269
      @ruizhang2269 11 месяцев назад +1

      Thank you for your kind and detailed explanation!! I learned a lot from it!! I am new to this area and need to do something with sensors and boards. : ) Much appreciated!!! @@RalphBacon

  • @yodasek
    @yodasek 5 лет назад +1

    Hello sir, I'm so happy I found your video, the explanation is very thorough and yet very complex. I've got a problem though. I'm trying to run your modified code for I2C scanner and weirdly, after running it it just shows "TCA9548A Scanner ready!
    " and then nothing happens. As far as I'm concerned, everything is wired properly, I've got my TCA9548a connected to SDA and SCL (pins 20 and 21 on Arduino Mega 2560) and an MPU9250 connected to channel 0 on TCA9548a. Do you have any idea why that would possibly be happening? Thank you so much in advance!

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Try putting something on the I2C bus that you _know_ works, such as an I2C LCD, Filip, or anything you have. Get it running on I2C on the native board first.
      Then put it on the TCA9548A. If it doesn't work there it must be your code. It's got to work on the standard board first so you have a known starting position. If you're getting problems get it working on an Arduino first before moving to the Mega2560. These are the steps I would take. Good luck.

    • @yodasek
      @yodasek 5 лет назад

      @@RalphBacon Ok, so I connected one of the MPU9250s directly to the I2C on the Arduino board. After running the scanner it immidiately found the sensor on 0x68 (at all ports, but that seems obvious since it doesn't really have ports as in TCA). Do you think my TCA could be fried? I just got employed at this company and don't really know what someone might have done to the TCA. Thank you so much for a quick response!

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      So it found your MPU9250 on hex address 0x68 on the native I2C bus of your Arduino. What do you mean by "at all ports"?

    • @yodasek
      @yodasek 5 лет назад

      @@RalphBacon It's just that running the code that is supposed to check 0-7 ports on TCA, it shows as if 8 of MPUs were connected to the TCA. Let me show you how it looks:
      -------------
      TCA9548A Scanner ready!
      TCA Port #0
      Found I2C 0x68
      TCA Port #1
      Found I2C 0x68
      TCA Port #2
      Found I2C 0x68
      TCA Port #3
      Found I2C 0x68
      TCA Port #4
      Found I2C 0x68
      TCA Port #5
      Found I2C 0x68
      TCA Port #6
      Found I2C 0x68
      TCA Port #7
      Found I2C 0x68
      Scan completed.
      -------------------
      However, I'm not concerned about that output since I know it's just one MPU connected. The point is, I suspect the TCA might be fried.
      Best regards

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      Yes, that looks odd indeed. Get another TCA and see how that output looks without changing anything else. That will prove it.

  • @56NeilWatson
    @56NeilWatson Год назад

    Ralph, I might have missed the explanation, but the code at line 17 is a bit confusing. Why 'Liquidcrystal_i2c &LCD'?

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

      The code you are referring to is the definition of the function:
      void displayLCD(int channel, LiquidCrystal_I2C &LCD, long value);
      This means that the function is expecting a reference to the LiquidCrystal_I2C object, we are _passing by reference_ not the usual _passing by value_ .
      The function therefore deals with that object over there (in memory) rather than a (throwaway) copy of the object given to the function to play with.
      This also means that the function can make changes to the object that persist - it's the actual object in memory, not a local copy that can't be modified.

  • @asagk
    @asagk 5 лет назад

    Having more than one pullup resistor has a big issue when pulling it down while communicating, since now large currents are flowing, while the resistors in parallel increase the current flow. 2*10k is like 5K but 10* 10K in parallel is only 1k. And many do not even use 10k, but only 4k7 values or on long lines even less than 4k7, which makes things even worse. At 10*4k7 is just 470 ohm. And on 5V, 470 Ohm is a already a current of about 10mA (53mW). But if the I²C line was planed to be long the pullup-drive needs to be stronger, and the resistor might be only like 470 Ohm. 10 of that is then only 47 Ohm (100mA) and that could already be too much for many ICs. So the conclusion is, there should be only one single pullup-resistor for each of the clk- and data-line, but no more than that! And that is actually the way it is meant to be on I²C-Bus. Multiple pullups in parallel are not recommended!

    • @RalphBacon
      @RalphBacon  5 лет назад +2

      Yes, I totally agree, Sebastian.
      The problem is that if the 'module' makers did not put a pull-up resistor on their boards then there would be _no_ pullups in force at all - with disastrous consequences for the I2C bus (ie it would not work) and it would seem that the I2C module was not working.
      So now we have the reverse situation as you have described; each module has the pullups and if you connect a few items onto the I2C bus it may stop working for all modules. To correct this, the 'module' makers should have the pullups connected via a simple jumper (they all go to VCC after all) but I guess that costs 1c too much for them.
      As it stands the modules are fine for individual testing. When implemented, however, the maker should ensure there is only 1 set of pullups active (ideally on the µMCU). Easy to say, harder to remember to do.

  • @alexsemine1
    @alexsemine1 5 лет назад

    Hi Ralph. Very nice video as always. I had no idea this existed. I didn't hit the wall yet with the I2C addresses issue but I'll certainly keep this IC in mind for some future projects. Question regarding the output selection. I thought it was done by setting a combination of 1 and 0 on the A0, A1 and A2 pins of the board, but you do it through software. It can be done both ways? Or what's the point of the A0, A1 and A2? Regarding the PCA9615 chip that I mentioned in another video comment, I think it would work just fine in combination with this one. At least I don't see why it shouldn't. Although you'll need a PCA9615 for each output of the multiplexer. Bought individually they're cheap but they're SMD chips and pretty small ones. Oddly only AdaFruit sells breakout boards of the PCA, 12 euros each, quite expensive. And for some reason the chinese guys don't make it. Best regards

    • @RalphBacon
      @RalphBacon  5 лет назад

      The A0, A1. A2 set the address of _this_ multiplexer on the I2C bus, Alex. In software we just tell it which output we want all future I2C comms to pass to, by talking to _this_ chip's address (as set by the A0, A1, A2). I hope that made sense!
      Regarding the PCA9615, I was thinking of using that (well, two of them) to allow the TCA9548A to be sited remotely. That is, the UNO (or whatever) is in your home, along with a PCA9615 and another PCA9615 is in your greenhouse/shed/beehive attached to various devices on the I2C bus (humidity, temperature, whatever). Basically, allowing I2C to be used over _much_ longer distances than normally allowed!
      Good to hear from you, thanks for posting.

    • @alexsemine1
      @alexsemine1 5 лет назад +1

      @@RalphBacon Oh, yes, that function of the A0, A1 and A2 makes much more sense. Your idea of using the PCA to make a sort of remote sensor station is great. What I was proposing was to use the same sort of temperature/humidity/whatever sensor in different locations. For example if you have several greenhouses or want to be monitoring the temperature inside, outside and in the house at the same time.

  • @OsoPolarClone
    @OsoPolarClone 5 лет назад

    Very informative. Thanks

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      You are most welcome Bruce Peterson, I'm glad you like the video. Nice to hear from you.

  • @webslinger2011
    @webslinger2011 5 лет назад

    Could experiment with sending multiple data wirelessly using nrf24l01 using an array? Like 2-4 Servos? This will be a great way to have more pins to use on the nano.

    • @RalphBacon
      @RalphBacon  5 лет назад

      I'm not totally clear what you're suggesting here, Webslinger. Nope, I've re-read this many times and I'm not sure what you're suggesting might a be a good idea. Care to elaborate?

    • @webslinger2011
      @webslinger2011 5 лет назад

      @@RalphBacon I'm making a small robot car with a 4 DOF Arm on top and making it move thru wireless control. Some of the data I'm sending to the receiver (using an array) is getting messed up. As I only have limited knowledge on how this thing could work, I'm hoping someone would create one. I tried to modify dronebot's robot car sketch to include servos but encountered an error. Some conflict with RF24 and the servo library.

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      The problems you describe are typical when someone tries to modify someone else's code. It's never that simple! I'm afraid I don't know the answer either but in your position, I would certainly try and find out whether the transmissions really have become garbled or whether the receiver is not interpreting them correctly. You can always try the Arduino forum forum.arduino.cc which as many experts there and may be familiar with what you are describing. Good luck.

    • @webslinger2011
      @webslinger2011 5 лет назад +1

      I think I got it working now. Combined 3 sketches into one. Tested with led's for the servo and two motors for moving forward/reverse and turning.

    • @webslinger2011
      @webslinger2011 5 лет назад +1

      Still working out how to use that PCA9685.

  • @rawlc.5086
    @rawlc.5086 3 года назад

    Thanks! So usefull. Great video.
    I have a question, i hope you could answer it to me.
    This means that i will just declare a single display and i am going to just assign different adresses so then i send the info i want to show? I'm working with 5 oled glcd ssd on a pic 18f4550... this means lots of ram memory, i'd like to know if this pretty device could let me just add one single glcd ssd1306 to my pic's program and save huge space of ram by only assigning an specific channel for each of my 5 displays while all of them are showing different infotmation? Am i getting it right?
    Hope you to see my question and sorry for my english. Have a nice day.

    • @RalphBacon
      @RalphBacon  3 года назад +1

      My understanding is that you would only have to declare one instance of the LCD device but you would have to be careful that you initialised _each one_ connected to the 9548A (in a loop, for example).
      After that, as per my demo sketch, you just send down what you want displayed to the device you want it displayed on. You could internally (in your sketch) remember which line/column stuff for each display was on, but you might not need this.
      Now, one final caveat. This was written for the Arduino using the LiquidCrystal library (and Wire library too). As long as you have the equivalent for your PIC set up (or you are doing it natively) you should be good to go. Alternatively, your PIC could send the information to the Arduino (data plus the device to display it on, via the TX/RX pins), and use it like a black box device. Just a thought!

    • @rawlc.5086
      @rawlc.5086 3 года назад +2

      @@RalphBacon thanks for answering!!!
      In fact, as long as you've toldme that in arduino is needed only 1 lcd, i felt peace in my soul and in my pic's ram space because on PIC shall be the same.
      I think that I'm gonna mix both languages (asm & c) as its already possible in mplab in order to create my 9548 library and also the glcd library i have.
      I've been following some other videos you have and i like your channel, your explanations are very clear and the content is really interesting. Congrats!!!
      Thanks for the good option about sending the requestment to arduino to controll them using the arduino libraryes and i2c using pic as master by tx rx transmition just as an experiment, i liked it, thanks :) i've never used arduino, in countrys like yours i believe arduino is a world without limits. i think its a really nice option for projects, but i have a personal issue with it, in my country at least a lot of people that i know, have never created something, they just wait or search some one doing a program and download it, most of them don't even know how to modify some parameters to fit theyr necesities... if they were like you, investigating, creating and programming i will love arduino in my country, otherwise i believe arduino have ruined creativity of my friends converting them in copy paste implementers.

  • @bob-ny6kn
    @bob-ny6kn 2 года назад

    Why is there no #include?

    • @RalphBacon
      @RalphBacon  2 года назад

      I'm assuming because it didn't need one. Perhaps another library had it included already?

  • @joymakerRC
    @joymakerRC 2 года назад

    THANKS BRO, LOVE YOUR FACE, ......AND BACON.....

  • @PavanMuppala
    @PavanMuppala 4 года назад

    can i use the same to read voltages of each cell from a battery pack connected in series.

    • @RalphBacon
      @RalphBacon  4 года назад

      No, that won't work. If you want to monitor the voltage of each individual cell, whilst connected in series, you will have to create a resistor ladder, measure each cell and subtract the value of all preceding cells in the ladder to find out the one you are measuring. Very easy to do, not so easy to describe here.

  • @kodigudlasreenu8602
    @kodigudlasreenu8602 5 лет назад

    can we use the multiplexer to get the values from various breakupboards simultaneously

    • @RalphBacon
      @RalphBacon  5 лет назад

      There's no such thing as 'simultaneously' when talking about a serial interface, Kodigudla. Each request has to complete fully before another request is sent.

  • @pierricdoublet6248
    @pierricdoublet6248 3 года назад

    Hello,it seems simple but after uploading the screens remains empty? an idea? Thanks in advance.

    • @RalphBacon
      @RalphBacon  3 года назад

      Does the screen work directly using I2C (ie no 9548A involved)?

    • @pierricdoublet6248
      @pierricdoublet6248 3 года назад

      @@RalphBacon Thanks for the quick answer in fact I found it was the addresses that were misinformed . Thanks again and continue like this .

  • @jonathanrodriguez8219
    @jonathanrodriguez8219 3 года назад

    can the voltage shifting be reveresed? I have a master MCU at 5V while controlling a slave 3.3V ??

    • @RalphBacon
      @RalphBacon  3 года назад +1

      As long as you buy the *bi-directional* level shifters then, YES, you can (and is what they are designed for). When first wiring these up it all seems a little fiddly but it's simpler than you think and "just works".

    • @jonathanrodriguez8219
      @jonathanrodriguez8219 3 года назад

      @@RalphBacon cool!!

  • @hermecildesanderson8656
    @hermecildesanderson8656 2 года назад

    and A0, A1, A2? How work it? I have spare pins...

    • @RalphBacon
      @RalphBacon  2 года назад +1

      You need to use I2C, pins A4 and A5 to communicate with it.

    • @hermecildesanderson8656
      @hermecildesanderson8656 2 года назад

      @@RalphBacon Thanks!! Have a good day

  • @henrikjensen3278
    @henrikjensen3278 5 лет назад

    I wonder if it is necessary to use two instances of the display driver or if it dumb enough to handle two displays with one instance. And do not tell me about good/bad praxis, it is on the bad side to use same instance for two displays, but it can save your some RAM memory.
    Pyton. Sorry I never got around to that language, C/C++/Java and in rare (Today, long time ago it was much more common) cases Assembler cover most of my needs, I am forced to use PHP and Javascript also, but I do not like them.

    • @RalphBacon
      @RalphBacon  5 лет назад

      What a lot of work you caused me, Henrik! I was intrigued by your question so I connected it all up again and tried it out. It *works with a single instance* of LCD - but there's a caveat. I could not get the second LCD to clear (blank the display, remove the cursor) UNTIL I initialised the LCDs in a specific order. So I had to talk to the LCD on channel 7 _first_ and then talk to the one on channel 1 and it's all working as it should. Guess what? This happens even when we have two instances of LCD so it must be a strange anomaly of these LCD displays (I guess).

    • @henrikjensen3278
      @henrikjensen3278 5 лет назад

      As long as the driver do not maintain any state information about the hardware it is usual possible to share same driver for multiple devices. One obvious state information could be initialized or not, preventing the driver from sending out multiple initializations.

    • @RalphBacon
      @RalphBacon  5 лет назад

      Yes, quite so, we could not interrogate the object hoping to get a sensible answer back (eg is the backlight on for a particular instance - unless it asks the actual device rather than maintaining that state in its object) but in this case it's just sending out data in a fairly straightfoward fashion. It's always useful to know.

  • @Rabyshko
    @Rabyshko 2 года назад

    Thanck You!

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

    does this let you read data from multiple i2c sensors, or only send data?

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

      Yes, read too but you have to then scan which device sent you the data. Easy enough to do though.

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

      @@RalphBacon Thanks for your response. I have a system I'm building with multiple ir temp sensors with the same address. what would be the easiest way to read both sensors as quickly as possible? I was hoping to use this and switch between the two extremely quickly so effectively its like reading both at the same time. But if I have to scan the new one(which I'm assuming you mean start a new transmission?) it sounds like that may take too long.
      From the data sheet of the MXL90614, I can't really tell if it's possible and how to change the address. I've never done something like this before. Thanks

  • @andymouse
    @andymouse 5 лет назад

    Hi Ralph, Quite a reasonable price board and a nice gesture to Adafruit, I look forward to your vids on micropython as I have it installed on a wemos D1 mini and its quite a departure from C++, very fast results by using REPL instead of writing compiling and uploading...cheers!

    • @RalphBacon
      @RalphBacon  5 лет назад

      Yes, it will be a new venture for me although I've used Python a bit on the Raspberry Pi (I still hate that indentation but must get used to it). Keep tuned!

  • @AJB2K3
    @AJB2K3 5 лет назад

    M5Stack have a fingerprint reader for $17.90 USD

    • @RalphBacon
      @RalphBacon  5 лет назад

      Which is actually a bit more expensive than either of the two I used in my demo - so what are you saying Adam, you're pointing out an alternative source? I've had a quick look at their store on AliExpress, it looks very nice - I shall look further when I have more time. If anyone else wants a look here it is:
      m5stack.aliexpress.com/store/3226069

    • @AJB2K3
      @AJB2K3 5 лет назад

      Ralph S Bacon ah sorry, I thought it was cheaper the the one you mentioned, never mind my mistake. Sorry

    • @RalphBacon
      @RalphBacon  5 лет назад

      No problems, it's nice to see you commenting on my channel. It's certainly cheaper than Adafruit's one at $49 in any case!

  • @TEACypher
    @TEACypher 5 лет назад

    Hi I would if ypu would be willing to do a video about this chip and how to convert an existing program that adresses 1 lcd / oled, to how to address it via a multiplexer? I am trying to work this out but struggling.

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      I can't do an entire video but the steps are straightforward. Before addressing anything else on the I2C bus, address this chip first and tell it which device you want all commands to go to. Thereafter, all I2C commands will be send to the pin you specified. If you build the demo circuit first (and use the demo sketch) it will probably give you a better idea of how it all works. The OLED screen connects then to the pin on _this_ device not the original I2C lines from the Arduino.

  • @zzazivsmazzipapa2984
    @zzazivsmazzipapa2984 5 лет назад

    please: Arduino
    Multilingual LCD menu

    • @RalphBacon
      @RalphBacon  5 лет назад +1

      I'm not totally clear on what you're saying (or asking) here. You want to display an LCD menu in different languages?

    • @zzazivsmazzipapa2984
      @zzazivsmazzipapa2984 5 лет назад

      @@RalphBacon hi thanks for answer
      Yes but I am amateur can you share tutorial

    • @zzazivsmazzipapa2984
      @zzazivsmazzipapa2984 5 лет назад

      @@RalphBacon sorry my English

    • @zzazivsmazzipapa2984
      @zzazivsmazzipapa2984 5 лет назад

      @@RalphBacon I am not find open source this project in the internet

    • @UpcycleElectronics
      @UpcycleElectronics 5 лет назад

      This is a playlist I made while trying to find examples of menus that worked with a rotary encoder. They are not specifically "multilingual," but there are some good examples there if you haven't seen them already. It's just a short list of references I saved for my own use.
      -Jake
      ruclips.net/p/PLPIwHuVy9EyPbM7zmvEB4Oz2hgORfQY6L