Link Ads

More search type here...

Showing posts with label Arduino play vocal. Show all posts
Showing posts with label Arduino play vocal. Show all posts

February 6, 2023

Arduino code for play vocal

This code uses the SoftwareSerial library to create a serial communication between the Arduino and a Bluetooth module. The Bluetooth module should be connected to the specified RX and TX pins and set to 9600 baud rate.

Note that this code is just a basic example and may need modifications depending on the specific setup and requirements.

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
  mySerial.begin(9600);
  pinMode(9, OUTPUT);
  digitalWrite(9, LOW);
}
void loop() {
  if (mySerial.available()) {
    digitalWrite(9, HIGH);
    mySerial.write(mySerial.read());
  }
}