Hello.
I use Freematics OBD-II Adapter (GPS Capable) with BLE. (Firmware v2 : data logger)
I am searching to solution about to read from SDCard to smart device, then write OBD data to SDCard, in order .
Does anyone have good idea or solution?
Read & Write to SDCard in order ?
Re: Read & Write to SDCard in order ?
What do you mean by "read from SDCard to smart device"?
Re: Read & Write to SDCard in order ?
Sorry. My Mistake. My English is not well.
I wanted to do that read to log data in sdcard and send to smart device.
anyway, I fined the solution that I want to do.
thank you.
I wanted to do that read to log data in sdcard and send to smart device.
anyway, I fined the solution that I want to do.
thank you.
Re: Read & Write to SDCard in order ?
cucugwh wrote:Sorry. My Mistake. My English is not well.
I wanted to do that read to log data in sdcard and send to smart device.
anyway, I fined the solution that I want to do.
thank you.
Can you share your solution?
Re: Read & Write to SDCard in order ?
This code is sample.
if recvByte is 0x01, then do "CustomAction1"
CustomAction1 open file, send "SD File context" to target device(iOS, Android) use BLE
Sorry, My Answer is too late.
if recvByte is 0x01, then do "CustomAction1"
CustomAction1 open file, send "SD File context" to target device(iOS, Android) use BLE
Sorry, My Answer is too late.
Code: Select all
void loop()
{
byte recvByte;
while(1){
if(SerialBLE.available())
{
recvByte = SerialBLE.read();
}
if(recvByte == 0x01){
//Custom Action1
delay(100);
sdfile = SD.open("Path of Your File ex:csv", FILE_READ);
if (!sdfile) {
return;
}
else
{
SerialBLE.print("datafile exist.");
while (sdfile.available()) {
SerialBLE.write(sdfile.read());
}
sdfile.close();
}
recvByte = 0x03;
}
if(recvByte == 0x02){
delay(100);
//Custom Action 2
}
}
}
Re: Read & Write to SDCard in order ?
Does it mean the Freematics OBD-2 adapter is capable of dumping info onto sdcard and then read the file and send it via BT to a connected BT device?
Re: Read & Write to SDCard in order ?
Your thread not clear me so much. If you know more about sd card must visit my website.