Uart on mkr zero

I am new to the arduino world, I am trying to use 2 GT-38 RF Modules to communicate with 2 arduinos, one is mkr zero and mkr gsm 1400.
The GT-38 works with uart and I have no idea how implement this on code, softwareserial library doesn't work on those boards and I have no idea what to do , I searched the internet for example and didn't find any.

Can you provide links to the technical information for the RF modules you are using?

This link provides datasheet for the module :

There is absolutely no reason the various software serial code will not work with this module.
Please show a block diagram with all the connections you have wired up, including the power supplies.

The reason there isn't an official SoftwareSerial library for the samd architecture of your MKR Zero and MKR GSM 1400 boards is because these microcontrollers provide superior options.

The first thing to know is that there is a dedicated hardware serial port on pins 13 and 14 named Serial1. This is separate from the Serial interface you use to communicate with the computer over the USB cable. So if you only need one serial port, you can just use this port as usual:

If you need more than one serial port, then you can use the microcontroller's SERCOM capability, as explained in this tutorial:

I have used this example :

When I tried to use the code, I got thise massege :
" #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors"

Both boards I have work with CLOCK SPEED 32.768 kHz (RTC), 48 MHz.

There are Arduinos and then there are other Arduinos. Obviously your Arduino is NOT the one the code was written for.

Do you know any other libraries I can use ?

Then I guess you somehow dug up a copy of the SoftwareSerial library and installed it. That will never work because the library is not compatible with the architecture of your board. This is the reason why the SoftwareSerial library is bundled with the "Arduino AVR Boards" platform of the Uno, Mega, Leonardo, etc. boards it was written for.

I recommend that you delete that SoftwareSerial installation you made, since it is already installed correctly for the boards that use it, and having it installed separately can cause you problems.

You don't need a library at all. You just need to replace the SoftwareSerial code in the sketch, which is simple:

Remove these lines:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

Now change all ocurrences of mySerial to Serial1.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.