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
Canot write to file: Datalogger 1141 (adafruit) and Arduino
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 4
- Joined: Mon Sep 30, 2013 6:52 am
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
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!)
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!)
-
- Posts: 4
- Joined: Mon Sep 30, 2013 6:52 am
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
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
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
- sensor.jpg (671.15 KiB) Viewed 827 times
-
- Back of board
- back.jpg (924.19 KiB) Viewed 827 times
-
- Front of board
- front.jpg (865.35 KiB) Viewed 827 times
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
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?
Do you see the light flash once per second to indicate writing to the card?
- Franklin97355
- Posts: 23912
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
Just putting the pins through the holes like that does not make very good connections.
-
- Posts: 4
- Joined: Mon Sep 30, 2013 6:52 am
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
Hi franklin97355franklin97355 wrote:Just putting the pins through the holes like that does not make very good connections.
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
-
- Posts: 4
- Joined: Mon Sep 30, 2013 6:52 am
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
The file now can be written by using the code you indicated.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?
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.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Canot write to file: Datalogger 1141 (adafruit) and Ardu
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.if I run the code on arduino due instead of uno I get the following compiler error
Please be positive and constructive with your questions and comments.