HI guys having trouble with the Arduino uno , I don’t know any thing about programing and pls help me correct this code for a voice controlled Bluetooth code(HC05) pls guys find my mistake in this
the code:
#include <HC05.h>
SoftwareSerial BT(10, 11)
String readvoice;
void setup() {
BT.begin(9600);
Serial.begin(9600);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
//-----------------------------------------------------------------------//
void loop() {
while (BT.available()){
delay(10);
char c = BT.read();
readvoice += c;
}
if (readvoice.length() > 0) {
Serial.println(readvoice);
if(readvoice == “forward”)
{
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(100);
}
else if(readvoice == “reverse”)
{
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
digitalWrite(6,HIGH);
delay(100);
}
else if (readvoice == “right”)
{
digitalWrite (3,HIGH);
digitalWrite (4,LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay (100);
}
else if ( readvoice == “left”)
{
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (100);
}
else if (readvoice == “stop”)
{
digitalWrite (3, LOW);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (100);
}
readvoice="";}}
the error is :
C:\Users\AMITSR~1\AppData\Local\Temp\ccw2AmqD.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_F1DMUR9I2F21ZQ9.ino.cpp.o.2222’:
ccw2AmqD.ltrans0.o:(.text.startup+0x64): undefined reference to `HC05::HC05(int, int)’
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
guys thx in advance , pls hurry gotta use this code on jan 1 for the project