Show Posts
|
|
Pages: [1]
|
|
1
|
Using Arduino / Project Guidance / Re: Sychronize JPEG camera and SD card
|
on: August 25, 2012, 03:55:33 am
|
|
Well, I tried your code, and got a quite strange result. I got four characters repeating infinitely on one only line of the Serial: æ, a square with 0080 written inside, another one with 0098, and the one with 0080 again. I'm using arduino 1.0.1, but I was normally using arduino 0023 until now. What does it all mean?
PS: Actually, as I'm working on a team project, I was supposed to finish with this today. It's just an amateur project, and there's no problem if it's not finished, but it would be nice if I could finish it. What I mean is that I would need the solution as soon as possible, because for now on I've more or less three hours to present the results of my work...
|
|
|
|
|
2
|
Using Arduino / Project Guidance / Re: Sychronize JPEG camera and SD card
|
on: August 24, 2012, 03:35:07 am
|
Unfortunately, the link to the web where I bought the camera seems to be broken... Anyway, I attach you every single file I've got about the camera and the SD library, where you can find all the source codes and sample codes. The most relevant sample code can be found at ./JPEGCamera/examples/JPEG_Sample/JPEG_Sample.pde. I must admit that I tried to jump into the source codes of both the camera and the card, and I found out that, for the writing, they both use a function called write (obviously overloaded, not the same for both), whose source code is also available on the .zip file I attached to you, but it's too complicated to me to understand  I thank you the efforts you're doing to help me.
|
|
|
|
|
3
|
Using Arduino / Project Guidance / Re: Sychronize JPEG camera and SD card
|
on: August 23, 2012, 10:27:05 am
|
A JPEG should start with 0xFF 0xD8, I think. That's also right. After some research, I found out that that's the "magic number" of the .jpg files, and I tried to "force" the future files to begin with this number, by writing it into each file before the foto translation and transport. But I got another error message... However, I attach to this post the TEXT.txt file so you can read it and eventually fix it; I'd be infinitely thankful.
|
|
|
|
|
4
|
Using Arduino / Project Guidance / Re: Sychronize JPEG camera and SD card
|
on: August 23, 2012, 03:14:13 am
|
That's right, I'm sorry. The actual fact is that I misunderstood a comment: it's not the card but the library I'm using that only accepts txt: MemoryCard.h //NOTE: The memoryCard libary can only create text files. I will post you my loop function, it will be easier that way... //deactivate the flag eof eof = 0;
//Reset count=camera.reset(response); delay(3000);
//Take a foto count=camera.takePicture(response);
//Take the size of the pic count = camera.getSize(response, &size);
/*Those comments have been just copy-pasted, it's not me who wrote them: //Create a file called 'test.txt' on the SD card. //NOTE: The memoryCard libary can only create text files. //The file has to be renamed to .jpg when copied to a computer. */ MemoryCard.open("/test.txt", true);
//Read the camera and write the data to the card while(address < size) { //Starts reading at the current address count=camera.readData(response, address);
//Stock it at the SD card for(int i=0; i<count; i++) { //If the end of file achieved (0xFF, 0xD9), active the eof flag if((response[i] == (char)0xD9) && (response[i-1]==(char)0xFF))eof=1;
//Write the data to the card MemoryCard.file.print(response[i], BYTE);
//If eof achieved, stop reading data if(eof==1)break; }
//Increase the current adress by the number of data read address+=count;
//Get out of the while loop if eof has been found if(eof==1)break;
} //Close the file MemoryCard.close();
I'd also like to signal that I need the foto to be transformed into text, for further interests of my project, that's why I don't even try to keep the foto in jpg format.
|
|
|
|
|
5
|
Using Arduino / Project Guidance / Sychronize JPEG camera and SD card
|
on: August 22, 2012, 04:29:15 am
|
Hi! I'm working on a project where I try to take a foto with a JPEG camera and stock it on my SD card. The codes of taking the foto and writing to the card have been taken out from example codes, I've already tested it and it works well. It happens that the SD card only takes text files, so I used an algorythm (also taken out from example codes concerning both the camera and the card at a time) to transform the .jpg to .txt, and it also worked fine. But, when I tried to invert the process to get back my foto, I followed the instructions on a commentary of the sample code: //The file has to be renamed to .jpg when copied to a computer. So I just took it out the card, copied it into my computer and renamed it... But it didn't work. It told me: Not a JPEG file: starts with 0xff 0xec So, if any of you could tell me why this happens or how to fix it, I'd be extremely thankful 
|
|
|
|
|
6
|
Using Arduino / Installation & Troubleshooting / Re: Problem with my first sketch uploading
|
on: February 07, 2012, 10:38:18 am
|
|
Wait, let's take a look on my error code, on the lines that say: "User configuration file is "/Users/Hernan_Hijo/.avrduderc" User configuration file does not exist or is not a regular file, skipping" I've checked it, and it's true: there isn't such a file there (even using the ls -a command). Should I create it, or maybe download it from anywhere?
|
|
|
|
|
7
|
Using Arduino / Installation & Troubleshooting / Re: Problem with my first sketch uploading
|
on: February 06, 2012, 10:18:39 am
|
Well, it's true that I can't access it without the Arduino plugged on, but this is actually useless: I have a little range of ports to connect the Serial Monitor, but no one of them seems to work with the board... I mean, the Serial itself works well, but the connection with the board doesn't. Maybe if I tried in another computer with Windows or Linux (I've both)... If I do and it still doesn't work, does it mean that it's a problem of the board? 
|
|
|
|
|
8
|
Using Arduino / Installation & Troubleshooting / Re: Problem with my first sketch uploading
|
on: February 05, 2012, 09:40:02 am
|
I can't actually do it. Step 7 says: "Connect the terminal application to the serial port for your board. The baud rate is irrelevant.", but my problem is that I actually haven't any port assigned to neither the serial nor the board, so I just am not able to connect the terminal to it (ehm, what does exactly "connect the terminal to the Serial" mean?) This scares me (maybe I'm acting like a poor n00b, however): does all this mean that my Arduino doesn't work? Was this a waste of money (I can't give it back as I bought it trough Internet)? please help me  Thank you very much.
|
|
|
|
|
10
|
Using Arduino / Installation & Troubleshooting / Problem with my first sketch uploading
|
on: February 01, 2012, 02:51:31 pm
|
Hello everybody! First of all, I know something very similar to my problem (actually, MY problem) has been posted here: http://arduino.cc/forum/index.php/topic,89801.0.htmlBut I've tried it and it still doesn't work. My problem is: when on the IDE, when I go to Tools>Serial Port I get the same list doesn't matter if it's connected or not. This obviosuly means that the IDE doesn't "see" the Arduino board is connected to my computer (an iMac with Snow Leopard 10.6.8 ). The connexion must be good itself, because the Arduino board does receive energy and blinks the L led when connected. How could I find out "where" it is or make my IDE load it well? Just in case it's useful, the error code I get whn trying to load the sample "Blink" code is: avrdude: Version 5.4-arduino, compiled on Oct 9 2007 at 11:20:31 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
System wide configuration file is "/Volumes/Arduino/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf" User configuration file is "/Users/Hernan_Hijo/.avrduderc" User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/tty.usbmodemfd131 Using Programmer : stk500v1 Overriding Baud Rate : 57600 avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: . [f9] avrdude: stk500_getsync(): not in sync: resp=0xf9 avrdude: Send: Q [51] [20] avrdude: ser_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding Thank you very much, wise people! 
|
|
|
|
|