Hello.
I wrote simple test program
/*
- main.cpp
*/
#include <Arduino.h>
#include <SoftwareSerial.h>// Data wire is plugged into pin 2 on the Arduino
#define BT_Rx 0
#define BT_Tx 1SoftwareSerial blueToothSerial(BT_Rx,BT_Tx);
void setup(void)
{
pinMode(BT_Rx, INPUT);
pinMode(BT_Tx, OUTPUT);
blueToothSerial.begin(9600);blueToothSerial.println("Step: 1");
}void loop(void)
{
while(blueToothSerial.available()){
blueToothSerial.write(blueToothSerial.read());
}
blueToothSerial.println("");delay(300);
}int main(void) {
init();
setup();while(true) {
loop();
}
}
I've connected via PC or Android BT Term.
I've got unpredictable echo from device.
Eg I pressed "p" letter, but I've got "n" letter etc.
What is it?
Arduino Nano + BTBeePro (HC-05)
Please help