Is it possible to connect two M5Atom with a cable...



  • Hello,

    Is it possible to connect two M5Atom with a cable by UART - without any additional equipment?
    "White" socket used to connect sensors?
    Possibly with an interleaved cable?
    And using interrupts?

    Kind regards,
    Kajetan



  • Depends what you what you want to achieve.
    If you mean to connect for programming/flashing the module - probably not.
    You would need to reconfigure the UART0 to pin 26/32 - I'm not even sure this can be done.
    If you just want to connect a "serial console" to communicate with your own running program then yes.
    You just need to set up UART1 or 2 to GPIO26 and 32 in your own program.
    Your console must be 3.3V TTL though



  • Sorry!
    For some reason I completely overlooked that you wanted to connect two devices together.

    So the answer is yes! Get a Grove cable:
    https://shop.m5stack.com/products/4pin-buckled-grove-cable?variant=16804807082074

    Remove/cut the the red (+5v) wire and setup the UARTs on both devices with "crossover" pin-config.
    I.e.:

    • Device A UARTx Tx=32 Rx=26
    • Device B UARTx Tx=26 Rx=32

    or vice versa.

    I'm not sure what you mean by "using interrupt", but you could (with same cable) define say pin 32 as output on device A and the same pin as an input defined to an interrupt on Device B and then perhaps the opposite with Pin 26