Hi. I'm currently working on something that need to transfer data from serial monitor to android.
I'm using
- Arduino UNO Rev3
- Bluetooth HC-05
- MIT Apps
The data from serial monitor will be transferred to MIT apps on android using Bluetooth HC-05.
#include <SoftwareSerial.h>
#define rxPin 2 // define SoftwareSerial rx data pin
#define txPin 3 // define SoftwareSerial tx data pin
SoftwareSerial blueTooth(rxPin, txPin); // create instance of SoftwareSerial
void setup()
{
Serial.begin(9600); // Start hardware Serial
blueTooth.begin(9600); // Start SoftwareSerial
}
void loop()
{
char c;
if (Serial.available())
{
c = Serial.read();
Serial.println(c); // Write the character to the Serial Monitor
blueTooth.write (c); // Write the character to Bluetooth
}
}
This is the codes that I have tried but it doesn't display anything on the MIT apps.