Canot write to file: Datalogger 1141 (adafruit) and Arduino

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
custo2013
 
Posts: 4
Joined: Mon Sep 30, 2013 6:52 am

Canot write to file: Datalogger 1141 (adafruit) and Arduino

Post by custo2013 »

Hi All

I have recently bought an arduino datalogger shield (1141) from adafruit and I wired it as indicated in the tutorial to get sensor data.
I can get the sensor data and display them on serial monitor (it is working fine) and I can also create the the file on SD card.

However the file on SD card shows no content at all... I cannot write anything on it.

I have been using the code that is available with the board (in the tutorial section). Is it everything fine with that ?

Ay Ideas ???

Thanks

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by adafruit_support_bill »

If you post photos of the front & back of the board we can check the assembly.

Does the Serial Monitor show any error message when opening the file? There is a "cardinfo" example sketch with the SD library. Run that and report the results (be sure to change the chip-select to pin 10 in the code!)

custo2013
 
Posts: 4
Joined: Mon Sep 30, 2013 6:52 am

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by custo2013 »

The files are created but with no content at all.
COntent of sensors dta (photoresistor) is displayed on serial only


Using cardinfo (chipselect = 10):


Initializing SD card...
Card type: SDHC

Volume type is FAT32

Volume size (bytes): 1837629440
Volume size (Kbytes): 1794560
Volume size (Mbytes): 1752

Files found on the card (name, date and size in bytes):
LOGGER00.TXT 2000-01-01 01:00:00 0
LOGGER00.CSV 2000-01-01 01:00:00 0
LOGGER01.CSV 2000-01-01 01:00:00 0
LOGGER02.CSV 2000-01-01 01:00:00 0
Attachments
Photoresistor
Photoresistor
sensor.jpg (671.15 KiB) Viewed 827 times
Back of board
Back of board
back.jpg (924.19 KiB) Viewed 827 times
Front of board
Front of board
front.jpg (865.35 KiB) Viewed 827 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by adafruit_support_bill »

Is this the example code you are using? https://github.com/adafruit/Light-and-T ... logger.pde
Do you see the light flash once per second to indicate writing to the card?

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by Franklin97355 »

Just putting the pins through the holes like that does not make very good connections.

custo2013
 
Posts: 4
Joined: Mon Sep 30, 2013 6:52 am

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by custo2013 »

franklin97355 wrote:Just putting the pins through the holes like that does not make very good connections.
Hi franklin97355

I totally agree. I wanted just a quick try at the board.
However I get the signal on serial monitor.
Have any suggestion on some faulty connections ?

Thanks

custo2013
 
Posts: 4
Joined: Mon Sep 30, 2013 6:52 am

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by custo2013 »

adafruit_support_bill wrote:Is this the example code you are using? https://github.com/adafruit/Light-and-T ... logger.pde
Do you see the light flash once per second to indicate writing to the card?
The file now can be written by using the code you indicated.

Thank you.


However, if I run the code on arduino due instead of uno I get the following compiler error (do I have to open another post or this will do ?):

...\Documents\Arduino\libraries\SDadafruitDataLogger/utility/Sd2Card.h:26,
...\Documents\Arduino\libraries\SDadafruitDataLogger/utility/SdFat.h:27,
...\Documents\Arduino\libraries\SDadafruitDataLogger/SD.h:24,
...\Documents\Arduino\libraries\SDadafruitDataLogger/utility/Sd2PinMap.h:23: fatal error: avr/io.h: No such file or directory
compilation terminated.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu

Post by adafruit_support_bill »

if I run the code on arduino due instead of uno I get the following compiler error
The Due uses quite a very different processor compared to other Arduinos and not all of the same code will run on it. We are in the process of porting libraries for it, but it will take some time.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”