Used for this test Ethernet shield (with SD card)
The programs are copies of the demo programs from the Arduino.cc website
- Card Info: Get info about your SD card.
- Datalogger: Log data from three analog sensors to an SD card.
- Dump File: Read a file from the SD card.
- Files: Create and destroy an SD card file. (*)
- List Files: Print out the files in a directory on a SD card.
- Read Write: Read and write data to and from an SD card.
So if you are tight in sketch space, it’s a good idea to find a smaller library.
For the programs below you need the ( codebender ) Serial Monitor as interface.
Card Info
Get info about your SD card.
Datalogger
Log data from three analog sensors to an SD card.
Dump File
Read a file from the SD card.Files
Create and destroy an SD card file.
This demo program on https://www.arduino.cc/en/Tutorial/Files did not work.
This demo program on https://www.arduino.cc/en/Tutorial/Files did not work.
List Files
Print out the files in a directory on a SD card.Read Write
Read and write data to and from an SD card.
work also direct out of the box. I tried it and ... not working.
On this shield near the connector is some text and found the corresponding Arduino pins for the SD
SD_SS - Arduino digital 10
SD_DI - Arduino digital 11
SD_DO - Arduino digital 12
SD_SCK - Arduino digital 13
Expect the chip select pin for the SD card in on this LCD shield is 10 ( not 4 as on the Ethernet shield).
Tested this with changing this in one of the scripts above ( ReadWrite ) and it worked !
> https://www.arduino.cc/en/Reference/SD
Some things to keep in mind when using the SD Library
> https://www.arduino.cc/en/Reference/SDCardNotes
Adafruit
> https://learn.adafruit.com/adafruit-micro-sd-breakout-board-card-tutorial/library
MCUFRIEND SD card
I also have a "mcufriend" TFT LCD shield with SD card reader and hoped the SD card program wouldwork also direct out of the box. I tried it and ... not working.
On this shield near the connector is some text and found the corresponding Arduino pins for the SD
SD_SS - Arduino digital 10
SD_DI - Arduino digital 11
SD_DO - Arduino digital 12
SD_SCK - Arduino digital 13
Expect the chip select pin for the SD card in on this LCD shield is 10 ( not 4 as on the Ethernet shield).
Tested this with changing this in one of the scripts above ( ReadWrite ) and it worked !
More info
SD Library> https://www.arduino.cc/en/Reference/SD
Using the SD library to create and remove files on a SD card
> https://www.arduino.cc/en/Tutorial/Files
Using the SD library to retrieve information over a serial port
> https://www.arduino.cc/en/Tutorial/Files
Using the SD library to retrieve information over a serial port
Some things to keep in mind when using the SD Library
> https://www.arduino.cc/en/Reference/SDCardNotes
Library options as the default lib is huge!
> http://blog.oscarliang.net/sd-card-arduino/
> http://blog.oscarliang.net/sd-card-arduino/
> https://learn.adafruit.com/adafruit-micro-sd-breakout-board-card-tutorial/library
Arduino LESSON 21: Log Sensor Data to an SD Card
> http://www.toptechboy.com/arduino/arduino-lesson-21-log-sensor-data-to-an-sd-card/
> http://www.toptechboy.com/arduino/arduino-lesson-21-log-sensor-data-to-an-sd-card/
Simple test
> http://garagelab.com/profiles/blogs/tutorial-how-to-use-sd-card-with-arduino
> http://www.jeremyblum.com/2011/04/05/tutorial-11-for-arduino-sd-cards-and-datalogging/
> http://garagelab.com/profiles/blogs/tutorial-how-to-use-sd-card-with-arduino
> http://www.jeremyblum.com/2011/04/05/tutorial-11-for-arduino-sd-cards-and-datalogging/
No comments:
Post a Comment