Hide minor edits - Show changes to markup
(:source http://github.com/arduino/Arduino/raw/master/libraries/SD/examples/DumpFile/DumpFile.pde lang=arduino tabwidth=4:)
(:source http://github.com/arduino/Arduino/raw/master/libraries/SD/examples/DumpFile/DumpFile.ino lang=arduino tabwidth=4:)
The code below is configured for use with an Ethernet shield, which has an onboard SD slot. In the setup(), we call SD.begin(), naming pin 4 as the CS pin. This pin varies depending on the make of shield or board you are using.
On our SD card, there is a file named "datalog.txt". In the loop(), we open the file by calling SD.open(). To send the file serially to our computer, we use Serial.print(), sending the contents of the file with SD.read().
The code below is configured for use with an Ethernet shield, which has an onboard SD slot. In the setup(), call SD.begin(), naming pin 4 as the CS pin. This pin varies depending on the make of shield or board you are using.
On the SD card, there is a file named "datalog.txt". In the loop(), the file is opened when calling SD.open(). To send the file serially to a computer, use Serial.print(), reading the contents of the file with SD.read().
(:include SDLibrarySeeAlsoIncludes :)
The code below is configured for use with an Ethernet shield, which has an onboard SD slot. In the setup(), we call SD.begin(), naming pin 4 as the CS pin. This pin varies depending on the make of shield or board you are using.
On our SD card, there is a file named "datalog.txt". In the loop(), we open the file by calling SD.open(). To send the file serially to our computer, we need use Serial.print(), sending the contents of the file with SD.read().
The code below is configured for use with an Ethernet shield, which has an onboard SD slot. In the setup(), we call SD.begin(), naming pin 4 as the CS pin. This pin varies depending on the make of shield or board you are using.
On our SD card, there is a file named "datalog.txt". In the loop(), we open the file by calling SD.open(). To send the file serially to our computer, we use Serial.print(), sending the contents of the file with SD.read().
image developed using Fritzing. For more circuit examples, see the Fritzing project page
(:divend:)
(:div class=circuit :)

In the code below, the Arduino starts out by setting the SCP1000's configuration registers in the setup(). In the main loop,it sets the sensor to read in high resolution mode, meaning that it will return a 19-bit value for the pressure reading, and 16 bits for the temperature. The actual reading in degrees Celsius is the 16-bit result divided by 20.
Then it reads the temperature's two bytes. Once it's got the temperature, it reads the pressure in two parts. First it reads the highest three bits, then the lower 16 bits. It combines these two into one single long integer by bit shifting the high bits then using a bitwise OR to combine them with the lower 16 bits. The actual humidity in Pascals is the 19-bit result divide by 4.
The code below is configured for use with an Ethernet shield, which has an onboard SD slot. In the setup(), we call SD.begin(), naming pin 4 as the CS pin. This pin varies depending on the make of shield or board you are using.
On our SD card, there is a file named "datalog.txt". In the loop(), we open the file by calling SD.open(). To send the file serially to our computer, we need use Serial.print(), sending the contents of the file with SD.read().
This example shows how to read a file from a SD card using the SD library and send it over the serial port. Please click here for more information on the SD library.
This example shows how to read a file from a SD card using the SD library and send it over the serial port. Please click here for more information on the SD library.
This example shows how to use the SD card Library to log data from three analog sensors to a SD card. Please click here for more information on the SD library.
This example shows how to read a file from a SD card using the SD library and send it over the serial port. Please click here for more information on the SD library.
Examples > SD DumpFile
This example shows how to use the SD card Library to log data from three analog sensors to a SD card. Please click here for more information on the SD library.
(:div class=BOM :)
(:divend:)
(:div class=circuit :)
image developed using Fritzing. For more circuit examples, see the Fritzing project page
(:divend:)
(:div class=circuit :)

(:divend:)
In the code below, the Arduino starts out by setting the SCP1000's configuration registers in the setup(). In the main loop,it sets the sensor to read in high resolution mode, meaning that it will return a 19-bit value for the pressure reading, and 16 bits for the temperature. The actual reading in degrees Celsius is the 16-bit result divided by 20.
Then it reads the temperature's two bytes. Once it's got the temperature, it reads the pressure in two parts. First it reads the highest three bits, then the lower 16 bits. It combines these two into one single long integer by bit shifting the high bits then using a bitwise OR to combine them with the lower 16 bits. The actual humidity in Pascals is the 19-bit result divide by 4.
(:div class=code :) (:source http://github.com/arduino/Arduino/raw/master/libraries/SD/examples/DumpFile/DumpFile.pde lang=arduino tabwidth=4:) (:divend:)