Hi PaulS, this is my sketch:
#include <SD.h>
char val;
File myFile;
void setup() {
Serial.begin(57600);
// see if the card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
}
void loop()
{
if(Serial.available())
{
myFile = "/sdcard/pic.jpg";
val = Serial.read();
switch(val)
{
case 'snap': // "snap" sent from android device to arduino via bluetooth to start the sending process
{
Serial.write(myFile);
delay(3000);
}
}
break;
}
}
From android side i currently developping a thread to receive the data (jpeg file) sent from arduino.
1/send "snap" to arduino
2/start listening data sent by arduino
3/close listening.
4/display picture on device screen