4 x Half duplex HC-12 wireless boards on two Arduino's (Bidirectional)

Thread Starter

Jim_cliff11

Joined Sep 5, 2015
36
Hi,

Ok so this is my setup. I have 2 Arduino Mega boards, each with one half duplex HC-12 wireless RF module attached. Using software serial board one transmits analogue values from a pot to board two which receives the value and subsequently outputs a PWM signal to control revs on an engine. So one board is ALWAYS transmitting and the other ALWAYS receiving. This works well.

Now, here is my issue....

I am wanting to take this further and attach an analogue water temp sensor to board 2. This value is then sent back to board 1 where it is displayed on an LCD. All simple enough right! But I need these engine rev control and water temp values sent between the two simultaneously with minimal delay, so basically bidirectional. I know with the current setup I could technically send values back and forth between the two, but while one is transmitting the other is receiving, they cannot both be receiving and transmitting at the same time. This won't do as the application requires minimal latency for controlling engine revs and the same for water temp feedback.

Instead of having to get my head around full duplex RF wireless boards and then having to alter my code massively I have another idea.

Could I attach a second set of HC-12 boards to each Mega and use a second software serial? So per Mega, while one HC-12 has a soul job of transmitting, the other has the job of receiving. The second Mega would have the same configuration. Each pair of HC-12' would then be setup to use different channels.

From this URL under limitations:
https://www.arduino.cc/en/Reference/SoftwareSerial

If using multiple software serial ports, only one can receive data at a time

Technically, even though each Mega would be running 2 software serials, only one software serial on each Mega would be receiving data (the other transmitting).

The long and short of it is..... Would this work?

Many thanks in advance.
Jim
 
Top