Hi everyone, i'm developping a system that requires Arduino Nano esp32 ( Nano ESP32 | Arduino Documentation) and need to comunicate via bluetooth as serial port. I can not utilize BLE which is already in this arduino device.
I connected a standard HC-05 bluetooth module to do so but i have some trouble unbderstanding which serial port should i use.
This arduino has 3 serial port right? Serial0 is used for USB comunication (pin D0 and D1 as RX and TX). Serial1 which i should use instead i defined as Ser:
#include "HardwareSerial.h"
const byte RXD2 = 7;
const byte TXD2 = 6;
HardwareSerial Ser(1); // Use UART channel 1
void setup()
{
Serial.begin(9600);
Ser.begin(9600, SERIAL_8N1, RXD2, TXD2); // D6,D7
delay(5000);
Serial.println("OK");
}
void loop()
{
Ser.println(millis());
delay(100);
}
But no message are sent trough the HC-05 to my bluetooth serial port.
Can someone help me?
cheers
Vittorio