Arduino Due

Hello People and experts,

I have bought one radio module and wanted to connect with Arduino Due, As I have looked there is no library like SoftwareSerial for the ARM controller.

In this case, how can i make a serial connection between my radio module and Arduino and get the data and information from the radio module and send the AT commands to the radio module.

Thanks
Alheida

The Due has four hardware serial ports. Only after all of those are used up would you need to worry about software serial.

See:

I am very new to this embedded world, Is there any example software for it ?

Thank you very much for your reply

Adalheida:
I am very new to this embedded world, Is there any example software for it ?

Thank you very much for your reply

1. Setup:
DUE and UNO are connected via DUE's hardware UART1 and UNO's software UART.

2. At every 1-sec interval, DUE transmits ABC; UNO receives the message and shows it on Serial Monitor.

3. The Codes are:
DUE Codes:

void setup()
{

  Serial.begin(9600); //hardware UART0 of DUE
  Serial1.begin(9600); //hardware UART1 of DUE

}

void loop()
{
  Serial1.println("ABC");
  delay(1000);
}

UNO Codes:

#include<SoftwareSerial.h>
SoftwareSerial mySUART(6, 7); //SRX, STX


void setup()
{
  Serial.begin(9600);
  mySUART.begin(9600);
}

void loop()
{
  if (mySUART.available() > 0)
  {
    Serial.print((char)mySUART.read());
  }

}

sm32.png

sm32.png

GolamMostafa:
1. Setup:
DUE and UNO are connected via DUE's hardware UART1 and UNO's software UART.

2. At every 1-sec interval, DUE transmits ABC; UNO receives the message and shows it on Serial Monitor.

3. The Codes are:
DUE Codes:

void setup()

{

Serial.begin(9600); //hardware UART0 of DUE
  Serial1.begin(9600); //hardware UART1 of DUE

}

void loop()
{
  Serial1.println("ABC");
  delay(1000);
}




**UNO Codes:**


#include<SoftwareSerial.h>
SoftwareSerial mySUART(6, 7); //SRX, STX

void setup()
{
  Serial.begin(9600);
  mySUART.begin(9600);
}

void loop()
{
  if (mySUART.available() > 0)
  {
    Serial.print((char)mySUART.read());
  }

}




![sm32.png|517x390](upload://1vHhoxtuJlyumsd7xkEPe9MZKQB.png)

Thank you very much for your response I really appreceate it. but In my case I do not have another controller like UNO. I need to send the data from the same controller and receive it from the same module.

Link to your radio module would be useful.

https://www.quectel.com/product/bc68.htm

As per Description of the Arduino Due, there are four ports available for the communication,

Serial: 0 (RX) and 1 (TX)
Serial 1: 19 (RX) and 18 (TX)
Serial 2: 17 (RX) and 16 (TX)
Serial 3: 15 (RX) and 14 (TX)

You can not use softwareserial, I am working on the same issue I can let you know by tommorow. If I get some improvemnet.

Thanky you.

I need to submit this project as early as possible. I can not understand it.

Adalheida:
Thank you very much for your response I really appreceate it. but In my case I do not have another controller like UNO. I need to send the data from the same controller and receive it from the same module.

As you don't have another Arduino, you can make a loop back connection between UART1 and UART2 of DUE and then upload the following sketch. (TX1 -----> RX2; RX1 <----- TX2).

Codes:

void setup()
{

  Serial.begin(9600); //hardware UART0 of DUE
  Serial1.begin(9600); //hardware UART1 of DUE
  Serial2.begin(9600);  //hardware UART2

}

void loop()
{
  Serial1.println("ABC");
  if(Serial2.available()>0)
  {
    Serial.print((char)Serial2.read());
  }
  delay(100);
}

sm33.png

sm33.png

That link just looks like the bare, surface-mount-solderable IOT module. If that's what you have it'll be tricky to connect to your Arduino.

It won't let me look at the datasheets etc without a login by the way so I can't even see what pins do what.

+1 Can't upload your datasheet. Provide the datasheet in attachement.

Anyway, if your radio module "breakout board" has RX and TX pins, connect RX to TX1 from DUE and TX to RX1 from DUE. Serial1 is USART0 BTW and there are 5 (five) hardware Serial (Serial,Serial1,2,3 and 4 by adding 3 lines of code).