Go Down

Topic: Connect HC-05 bluetooth module with MKR Zero board (Read 1 time) previous topic - next topic

Shawn_Li

Hi all,

I am using HC-05 Bluetooth module with the MKR board to achieve the data transmission between the Arduino and an Android phone. The library I am using is
Code: [Select]
#include<SoftwareSerial.h>But when I upload the configuration code of HC-05, there is en error saying "This version of SoftwareSerial supports only 20, 16 and 8MHz processors". I don't know if this library doesn't work for MKR Zero board? If not working, how can I use HC-05 module?

The following is the configuration code from online
Code: [Select]
#include <SoftwareSerial.h>

//Change these to whatever pins you're using
SoftwareSerial blueSerial(13, 14); // RX, TX

void setup()
{
  Serial.begin(9600);
  blueSerial.begin(38400);
//  pinMode(9, OUTPUT);
//  digitalWrite(9, HIGH);
}

void loop()
{
  if (blueSerial.available())
  {
    Serial.write(blueSerial.read());
  }
  if (Serial.available())
  {
    blueSerial.write(Serial.read());
  }
}

Shawn_Li

The problem is solved by removing the SoftwareSerial.h library and replace the blueSerial with Serial1

Shawn_Li

Now I can get into AT mode, but when I type AT in the serial monitor, there is no "OK" responding, actually there is nothing appearing on the monitor. Anyone know the solution to this problem? Thanks in advance!

Go Up