hello,
i have a problem for take a picture.
i use the exemple code but i have no answer with serial monitor .
its blocked on "AT+CCAMS".
help me pls !
i am french(sry for my bad english)
exemple code:
Code:
int led = 13;
int onModulePin = 2; // the pin to switch on the module (without press on button)
int x = 0;
char name[20];
void switchModule(){
digitalWrite(onModulePin,HIGH);
delay(2000);
digitalWrite(onModulePin,LOW);
}
void setup(){
Serial.begin(115200); // UART baud rate
delay(2000);
pinMode(led, OUTPUT);
pinMode(onModulePin, OUTPUT);
switchModule(); // switches the module ON
for (int i=0;i < 5;i++){
delay(5000);
}
Serial.println("AT+CCAMS"); //starts the camera
while(Serial.read()!='K');
Serial.println("AT+CCAMSETD=640,480"); //sets VGA (640*480) resolution
while(Serial.read()!='K');
Serial.println("AT+FSLOCA=1"); //stores the image file in sd card
while(Serial.read()!='K');
}
void loop(){
delay(1500);
while(Serial.available()!=0){
Serial.read();
}
Serial.println("AT+CCAMTP"); //takes a picture, but not saved it
while(Serial.read()!='K');
Serial.println("AT+CCAMEP"); // saves the picture into D:/Picture
Serial.flush();
while(Serial.read()!='/');
while(Serial.read()!='/');
x=0;
do{
while(Serial.available()==0);
name[x]=Serial.read();
x++;
}while(x < 19);
while(Serial.read()!='K');
Serial.println(name);
Serial.println("AT+CCAME"); // stops the camera
while(Serial.read()!='K');
while(1);
}