Module HC-05 error when sending

I have this code and when I try to send it to the Arduino board I get this error. I included the library after watching a video, but without it I also got this error. Thank you.

#include <SoftwareSerial.h>

SoftwareSerial miBT(0,1);
char dataFromApp= 0 ;
int LUZF1=13;

void setup() {
miBT.begin (38400);
Serial.begin (9600);
pinMode(LUZF1, OUTPUT);

}

void loop() {
if (miBT.available()){
  dataFromApp = miBT.read();
  if (dataFromApp == 'F') {
digitalWrite(LUZF1, HIGH);
    }
  }
}

is hc-05 connected to arduino while uploading ? try with serial pins disconnected .

which arduino are you using ? pin 0 and 1 are the hardware serial pins on many boards

Why? Pins 0 and 1 are the hardware serial port and can only provide one function. So either move miBT to two other pins or get rid of the SoftwareSerial and use the hardware serial functionality to communicate with the HC05; you will loose communication with the PC.

@J-M-L, looking at the data in the output window, it's a 328P.

reading on my phone... too small for me even if tapping the image

1 Like

Your images are not readable.
Please read the advice in the topic "How to get the best from this forum". How to get the best out of this forum