TransWikia.com

Fastest Communication from NodeMCU to Arduino Nano

Arduino Asked by prikarsartam on September 25, 2021

For one of my projects, I need to transmit data from NodeMCU to my Arduino Nano, in real time, I used S-Bus, but it quite unsatisfies me, as, slight latency is taking place.
I am transmitting a JSON file, with 4 signed 16 bit integeres.

Now,I need to know, what is the fastest and most reliable way to transmit data from NodeMCU to an Arduino Nano. Any detailed description, or even suggestion will be very much helpful. Thanks in advance !

One Answer

If it comes to speed and reliability you have to choose an interface that is handled in hardware on both sides. For the arduino nano you have the following options (nodeMCU supports all of them):

  • UART:
    • not very fast (order of 10kbit/s), but it's full-duplex (asynchronous communication in both directions)
    • implementation is trivial due to Serial.h
    • long distance (order of meters)
  • I2C:
    • not very fast either (order of 100kbit/s), but not full-duplex
    • implementation is straight forward because both slave and master are implemented in arduino library
    • only over short distance (order of cm)
  • SPI:
    • quite fast (>1Mbit/s), full-duplex
    • implementation might require some experience (as far as I know, slave mode is not supported by SPI.h)
    • long distance (order of meters)

Which of those is the best option still depends on your specific requirements, but personally I like SPI very much because it is very fast and stable.

Correct answer by Sim Son on September 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP