Software Serial missing library?

Hello I'm trying to connect my blue tooth module With a sketch that ihave found online to do AT commands. When i try to upload I get a error saying SoftwareSerial.h is missing. So i looked through the libraries in my Documents and in the Arduino folder within the C: Driend it is not there. So i searched online downloaded a few and getting a lot more errors then before i get one that says delay errors and Some other stuff.

My board I'm using a arduino zero board it is what i have handy for now and a Hc_05 bluetooth module. The sketch is added below. Can someone please help me with this serial problem?

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(10, 11); // CONNECT BT RX PIN TO ARDUINO 11 PIN | CONNECT BT TX PIN TO ARDUINO 10 PIN

void setup() 
{
  pinMode(9, OUTPUT);  // this pin will pull the HC-05 pin 34 (key pin) HIGH to switch module to AT mode
  digitalWrite(9, HIGH); 
  Serial.begin(9600);
  Serial.println("Enter AT commands:");
  BTSerial.begin(38400);  // HC-05 default speed in AT command more
}

void loop()
{

  // Keep reading from HC-05 and send to Arduino Serial Monitor
  if (BTSerial.available())
    Serial.write(BTSerial.read());

  // Keep reading from Arduino Serial Monitor and send to HC-05
  if (Serial.available())
    BTSerial.write(Serial.read());
}

Edited: I forgot one thing I'm using IDE: 1.8.5

Is SoftwareSerial on your PC? It should be under .../Arduino/libraries/SoftwareSerial

Hello in This Version of ide it is not there.

SoftwareSerial does not work on the zero. There is a different version for that platform.

Hello can you tell me where i can find it please? I have been looking all over.

I suspect that software serial is specific for the AVR based boards (like Uno).

You can have a look at Overview | Using ATSAMD21 SERCOM for more SPI, I2C and Serial ports | Adafruit Learning System to configure some pins for another hardware serial port.

I've never used a Zero, so can't advise further. There are some people here that are very knowledgeable when it comes to SAM-based boards.

There is a dedicated Arduino Zero section where your question might fit better. You can ask a moderator to move this thread by clicking the 'report to moderator' link under your post.

blh64:
Is SoftwareSerial on your PC? It should be under .../Arduino/libraries/SoftwareSerial

I don't think that that is the case for non-avr boards; might be mistaken though.

Honestly i did look at the adafruit site and got so confused on it.

The other question is, why would you? With SERCOM on the M21 you can configure almost every pin to function as a hardware UART.

I'm so confused with this Sercom stuff. I have no clue on it never did it before.

But still back to my problem with what to do on the blue tooth module.

There's not much you can do with it until you can communicate with it. Have a read through the attached article. The back pages deal with setting up SERCOM and may give you some insight.

Arduino Zero.pdf (1.08 MB)

here is a update. It looks like i found a Pro mini board hidden that is not in use. I will have to use that for now. Into i figure out this whole Sercom stuff. Thank you all for the help. I will update this post As soon as i can figure out things.

For further study, here is the Atmel application note. There's a software file that goes with it, but it's 4.9MB and won't upload. You can get it from the Microchip site, just query 42539 or AT11626.

Atmel-42539-SAMD-SERCOM-USART-Configuration_ApplicationNote_AT11626.pdf (1.29 MB)

This code from

shows how to add Serial2 on pins 10(TX) and 11(RX).

#include <Arduino.h>   // required before wiring_private.h
#include "wiring_private.h" // pinPeripheral() function

Uart Serial2 (&sercom1, 11, 10, SERCOM_RX_PAD_0, UART_TX_PAD_2);
void SERCOM1_Handler()
{
  Serial2.IrqHandler();
}

void setup() {
  Serial.begin(115200);

  Serial2.begin(115200);
  
  // Assign pins 10 & 11 SERCOM functionality
  pinPeripheral(10, PIO_SERCOM);
  pinPeripheral(11, PIO_SERCOM);
}

uint8_t i=0;
void loop() {
  Serial.print(i);
  Serial2.write(i++);
  if (Serial2.available()) {
    Serial.print(" -> 0x"); Serial.print(Serial2.read(), HEX);
  }
  Serial.println();
  
  delay(10);
}

Thank you all for the help and thank you oqibidipo. I will try this out and see if i can talk to my blue tooth module. Will post a update soon. again thank you all for the help.