빨----주------노--초 연결법
빨----주------노--초 연결법
#include <SoftwareSerial.h>
SoftwareSerial Bluetooth(3, 2); // HC-06(TXD), HC-06(RXD)
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(19200);
Serial.println("Ready..");
// set the data rate for the SoftwareSerial port
Bluetooth.begin(9600);
// Bluetooth.println("AT"); // Test Module
}
void loop() // run over and over
{
if (Bluetooth.available())
Serial.write(Bluetooth.read());
if (Serial.available())
Bluetooth.write(Serial.read());
}
https://brunch.co.kr/@topasvga/2022
감사합니다.