arduino + camera + sd memory card

Nice!

wow! That's very usefull for me! :wink:

I have got exactly the same error messages as Posox while compiling the program with AVR-GCC 4.3.4.
Did anybody find our mistake ?

I think this is terrific and am looking at following your lead.
First question though -the camera
Nowhere does anybody give the resolution in megapixels. The photo of you looks a bit grainy but the one on the first site mentioned looks much better.

I'd like to start off with a decent camera image if I am going to spend the time

What would you use if you were to do it over?

@tytower - thanks! the max resolution is 640x480. check out http://jarv.org/sdcam.shtml for what I ended up doing with it eventually. It worked out well but I don't have any future plans beyond what I've done so far.

@stan49 - PB2 is just the pin number for the board, should be grabbing it from the include files. Not sure what is going on there with the arduino project. Maybe try the project from http://jarv.org/sdcam.shtml to see if you get better results?

Yes jarv I saw that before and liked the idea .

My question more concerned the resolution of the images .
Is there a sample of what you shot over the park ?

If you were doing it over would you use the same camera or seek a better one?

yeah check out the flickr set here -> arduino_sdcam | Flickr

quality is not that great, i'm not sure what i would use the camera for given the low quality. With digicams as cheap as they are which can be controlled with a relay I don't know how useful it is unless you are interested in direct image manipulation.

hello everyone, i'm newbie in this forum..

this is my first time experience using arduino and i'm interesing in this project and this post is very usefull for me..

but i still understand how to interface the sd card with the EEPROM..

I'm using Arduino Deamilanova,
Breakout Board for SD-MMC Cards
and C328 camera module

thank you very much for your help.

I think that the 1st question isn't

how to interface the sd card with the EEPROM

. The 1st question is why?

What is it you want to do that involves both EEPROM and the SD card?

okay i get it now..

EEPROM and SD/MMC Card both are same memory..
i don't need to us both of them at the same time..

thank you very much for the information..
this is my first project on arduino

I'm already compiling the sketch the code from jarv website http://jarv.org/sdcam.shtml

but i get some errors here (same like posox and stan49) :

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c: In function 'sd_raw_init':

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c:184: error: 'PB2' undeclared (first use in this function)

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c:184: error: (Each undeclared identifier is reported only once

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c:184: error: for each function it appears in.)

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c: In function 'sd_raw_read':

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c:471: error: 'PB2' undeclared (first use in this function)

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c: In function 'sd_raw_write':

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c:719: error: 'PB2' undeclared (first use in this function)

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c: In function 'sd_raw_get_info':

/Users/posox2000/Documents/Arduino/libraries/sdc328/sd_raw.c:864: error: 'PB2' undeclared (first use in this function)

I am using "Adruino Duemilanove" and arduino0017 as compiler

i already read the latest post on this topic but i can't find the answer..
can you guys help me?

thanks

Bumping this thread, has there been a resolution to the above issue?
I tried the same thing. Downloaded the package from:

http://jarv.org/sdcam.shtml

Tried to compile the example code and got the following error:

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c: In function 'sd_raw_init':

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c:184: error: 'PB2' undeclared (first use in this function)

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c:184: error: (Each undeclared identifier is reported only once

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c:184: error: for each function it appears in.)

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c: In function 'sd_raw_read':

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c:471: error: 'PB2' undeclared (first use in this function)

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c: In function 'sd_raw_write':

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c:719: error: 'PB2' undeclared (first use in this function)

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c: In function 'sd_raw_get_info':

/home/erik/arduino-0018/libraries/sdc328/sd_raw.c:864: error: 'PB2' undeclared (first use in this function)

any advice would be appreciated

grayscale: debes entrar a sd_raw_config.h y cambiar:

#define select_card() PORTB &= ~(1 << PINB2)
#define unselect_card() PORTB |= (1 << PINB2)
#define configure_pin_available() //DDRC &= ~(1 << DDC4)
#define configure_pin_locked() //DDRC &= ~(1 << DDC5)

#define get_pin_available() 0 //((PINC >> PC4) & 0x01)
#define get_pin_locked() 0 //((PINC >> PC5) & 0x01)

luego te vas a sdcamera.cpp y pones en comillas

SDCameraC328R::SDCameraC328R()
{
_packageSize = DEFAULT_PACKAGE_SIZE;
_sd = 0;
_file_counter = 0;
/** set_output(DDRD,LED); */
strcpy(filename, "picture.jpg");

suerte.

HOW READ THE SD CARD..........I CANT READ SD CARD

perdon es

#define get_pin_available() 0
#define get_pin_locked() 1

good luck

I don't think thats the fix. PB2 on the AVR is technically digital pin 10 on the arduino. I modified the files suggested, but after trying to compile again I get the following:

/home/erik/arduino-0018/libraries/sdc328/SDCameraC328R.cpp: In member function 'uint8_t SDCameraC328R::update_exif_GPGGA(char*)':

/home/erik/arduino-0018/libraries/sdc328/SDCameraC328R.cpp:195: error: 'strtok' was not declared in this scope

/home/erik/arduino-0018/libraries/sdc328/SDCameraC328R.cpp: In member function 'uint8_t SDCameraC328R::update_exif_GPRMC(char*)':

/home/erik/arduino-0018/libraries/sdc328/SDCameraC328R.cpp:279: error: 'strtok' was not declared in this scope

Because it's also tripping up on strtok (C++ function no?) I'm pretty sure this is a gcc version issue, I'm running avr-gcc 4.3.3 ubuntu 9.10. I can't for the life of me figure out how to update to an newer version, any advise?

Edit: I spoke with the author jarv. He is running avr-gcc 4.3.4. I'm really suspecting a version issue at this point. If anyone can advise me on how to update my avr-gcc version to 4.3.4 I would appreciate it. I thought I had accomplished it last night, but after a very long compile, I checked my version with avr-gcc --v but still get 4.3.3 as the result.

i just began work with arduino, and i need to set up something like this, but i don't have a GPS. How would i make this without the GPS?

It seems that I will be bumping this thread, again.

I was wondering is anyone has had any success using avr-gcc as opposed to the arduino IDE. This implementation of these components would be excellent for a project I am working on, but the arduino v00018 returns the same errors for me that other user's have experienced.

Regrettably, I am an utter AVR newb, and I don't have any idea of where to begin in terms of uploading jarv's program to an arduino (deumilonove, atmega328). I am running win7 and I have installed winarv. If anyone could provide some direction it would be greatly appreciated.

Great work !
My problem is that I want to use the C328R camera together with the S65 Shield from Watterott. (which has a micro sd slot included)
The demo included to write to the card is the following:

void write_something(void)
{
  FIL fdst;     //file objects
  FRESULT res;  //result code
  UINT wr;      //file R/W count
  char data[16];

  res = f_open(&fdst, "xxx.txt", FA_CREATE_ALWAYS | FA_WRITE);
  if(res == FR_OK)
  {
    strcpy(data, "test 123");
    res = f_write(&fdst, data, strlen(data), &wr);
    f_close(&fdst);
  }
}

How can I implement this code into your one in the first post ?
Thanks for any help :slight_smile:

I'm using some of this code for a project I'm working on, and since the thread isn't THAT old I figure I'll add this in case anyone is still out there having compile problems.

It is an AVR-GCC version issue as far as I can tell, and I installed the latest version of Ubuntu (10.04) and installed the Arduino stuff and everything works fine. Compiling on Windows still yields the PB2 error.

That's very cool.

I've found a British supplier of small cameras with onboard JPEG encoding. I don't know the difference between TTL and RS232 - could someone enlighten me?
http://www.coolcomponents.co.uk/catalog/index.php?cPath=45