2 Arduinos using the one radio. Possible?



  • The title really says it all...

    Seeing that I'm having issues running an LED strip and motion sensor from the one Arduino, I was thinking about creating two sensors, one controlling the LED strip and the other for motion sensing. Is it possible for the two to share the one radio? I'm guessing the answer is no, but thought I'd ask.

    Thanks in advance!


  • Mod

    @homer the arduino's can't share the radio. However, it is possible to connect the 2 arduinos over serial (or some other protocol) and let the Arduino that is connected to the radio forward messages that the other Arduino sends over serial.

    But this will create a much more complex sketch, with more sources for trouble, and it will be much harder to troubleshoot. So unless you have a very compelling reason, or want to build complex things to learn, it will not be worth the effort.

    I connected 2 Arduinos over serial in this project. You can study it if you want to.



  • @mfalkvidd Thanks for sharing your thoughts. I'll check the link out at a later stage when my confidence is high 😁😁😎



  • I think it is not very difficult sharing radio between two Arduinos.
    But only for sending ...
    Simply hold CS signal off for both Arduinos.
    And connect both of them by signal, which tell each other if it is sending.
    Other Arduino must wait for indication, that radio is free.
    And radio initialisation only from one of them too.



  • ... or you may want to connect the radio to one node, and link to the other by some means (like pins, serial ports, I2C ...)

    Have a look, for example, to https://create.arduino.cc/projecthub/MajorLeeDuVoLAB/nano-i2c-io-expander-3e76fc?ref=platform&ref_id=424_updated___&offset=1262



  • More good info! Thanks 👍 👍 👍



  • Well I think this is a workaround because something which should work doesn't for you. I would rather try to find out why your sensor doesn't work in first place. When sharing a radio, it adds complexity rather than reducing it.

    What's the issue?
    I have multiple LED-strips with a motion sensor and they work quite well. However having a good power source is a must, the LED might drain quite some energy.



  • @parachutesj said in 2 Arduinos using the one radio. Possible?:

    Well I think this is a workaround because something which should work doesn't for you. I would rather try to find out why your sensor doesn't work in first place. When sharing a radio, it adds complexity rather than reducing it.

    What's the issue?
    I have multiple LED-strips with a motion sensor and they work quite well. However having a good power source is a must, the LED might drain quite some energy.

    I agree, but I feel like I've exhausted everything. If you want you can check out here which is my tale of woe lol



  • Hello,

    Some ware in MySensors website have info how to combine 2 sketches, i think one Arduino can handle all your need.


 

193
Online

8.7k
Users

9.5k
Topics

99.9k
Posts