Bluetooth Serial Monitor for Arduino
- By ApolloDG
- Android Development
- 1 Replies
This is how I am currently taking the information from the SD card and transmitting it over bluetooth:
(I have confirmed it works by installing an app called 'Arduino bluetooth controller' and using its built in terminal which basically is the functionality I am looking for, but without the key the capability of either being able to save the terminal as a txt file or being able to copy the txt on the terminal and then paste it into a txt file myself.)
#include <SD.h>
#include <SPI.h>
File myFile;
String strRead,str;
const int chipSelect = 10;
void setup()
{
Serial3.begin(9600);
Serial3.println("Initializing...");
if (!SD.begin(chipSelect))
{
Serial3.println("SD FAIL");
while(1);
}
Serial3.println("SD DONE");
myFile = SD.open("fuellog.txt");
if (myFile)
{
Serial3.println("fuellog.txt:");
while (myFile.available())
{
strRead = myFile.readString();
Serial3.print(strRead);
//myserial.write(Serial3.read());
}
myFile.close();
}
else
{
Serial3.println("SD FAIL READ");
}
}
void loop()
{
}
(I have confirmed it works by installing an app called 'Arduino bluetooth controller' and using its built in terminal which basically is the functionality I am looking for, but without the key the capability of either being able to save the terminal as a txt file or being able to copy the txt on the terminal and then paste it into a txt file myself.)
#include <SD.h>
#include <SPI.h>
File myFile;
String strRead,str;
const int chipSelect = 10;
void setup()
{
Serial3.begin(9600);
Serial3.println("Initializing...");
if (!SD.begin(chipSelect))
{
Serial3.println("SD FAIL");
while(1);
}
Serial3.println("SD DONE");
myFile = SD.open("fuellog.txt");
if (myFile)
{
Serial3.println("fuellog.txt:");
while (myFile.available())
{
strRead = myFile.readString();
Serial3.print(strRead);
//myserial.write(Serial3.read());
}
myFile.close();
}
else
{
Serial3.println("SD FAIL READ");
}
}
void loop()
{
}