logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

[Rozwiązano] Podłączanie 4 czujników MPU6050 do Raspberry PI: Instrukcje dla początkujących

marula111 19 Gru 2022 22:34 402 3
REKLAMA
  • #1 20343717
    marula111
    Poziom 9  
    Posty: 54
    Ocena: 3
    Witam,

    Poszukuję opisu jako połączyć 4 szt. MPU6050 do Raspberry Pi. Ktoś? Coś może polecić?
    (może być po angielsku), ale dla początkujących.

    Dzięki.
  • REKLAMA
  • Pomocny post
    #2 20344313
    miszcz310
    Poziom 25  
    Posty: 717
    Pomógł: 46
    Ocena: 178
    Ale jaki tutaj opis jest potrzebny? Bierzesz datasheet i wszystko wiesz.
    W datasheecie strona od 36 do 39 (źródło:https://botland.com.pl/index.php?controller=attachment&id_attachment=357)


    "9.2 I2
    C Interface
    I2
    C is a two-wire interface comprised of the signals serial data (SDA) and serial clock (SCL). In general, the
    lines are open-drain and bi-directional. In a generalized I 2
    C interface implementation, attached devices can
    be a master or a slave. The master device puts the slave address on the bus, and the slave device with the
    matching address acknowledges the master.
    The MPU-60X0 always operates as a slave device when communicating to the system processor, which thus
    acts as the master. SDA and SCL lines typically need pull-up resistors to VDD. The maximum bus speed is
    400 kHz.
    The slave address of the MPU-60X0 is b110100X which is 7 bits long. The LSB bit of the 7 bit address is
    determined by the logic level on pin AD0. This allows two MPU-60X0s to be connected to the same I2
    C bus.
    When used in this configuration, the address of the one of the devices should be b1101000 (pin AD0 is logic
    low) and the address of the other should be b1101001 (pin AD0 is logic high)."

    Czyli na jednej lini IIC możesz mieć dwa układy, pod warunkiem, że ustawisz im różne adresy. Jak podłączyć coś po iic do raspberry to na yt jest dużo filmików. Podłącz najpierw jeden. Skomunikuj się, potem podłącz drugi itd.
  • REKLAMA
  • #3 20344351
    marula111
    Poziom 9  
    Posty: 54
    Ocena: 3
    Dzięki. Problem był taki, że dla "pierwszaka" datasheet to nowe pojęcie, ale skoro wiadomo, że coś takiego istnieje, to faktycznie nie ma już problemu.
  • #4 20344356
    viayner
    Poziom 43  
    Posty: 10609
    Pomógł: 1559
    Ocena: 2032
    Witam,
    a mozesz opisac co chcesz zrobic?
    Mozesz rozwazyc "odlacznie" zasilania od nie uzywanego MPU, musisz tylko uwzglednic "boot time" po jego zalaczeniu.
    Multiplekser SDA/SDC? ale jak musza dzialac z pelna szybkoscia to nie wiem czy sie nie wysypie.
    Pozdrawiam
REKLAMA