Loading...

Tutorial.Datalogger History

Hide minor edits - Show changes to markup

December 05, 2011, at 02:52 AM by Federico -
Changed lines 18-19 from:
to:
December 05, 2011, at 02:47 AM by Federico -
Changed line 31 from:

(:source http://github.com/arduino/Arduino/raw/master/libraries/SD/examples/Datalogger/Datalogger.pde lang=arduino tabwidth=4:)

to:

(:source https://raw.github.com/arduino/Arduino/master/libraries/SD/examples/Datalogger/Datalogger.ino lang=arduino tabwidth=4:)

March 18, 2011, at 01:04 PM by Tom Igoe -
Changed lines 24-25 from:

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.

to:

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.

March 18, 2011, at 11:10 AM by Scott Fitzgerald -
Changed line 12 from:
  • Breadboard or prototyping Board
to:
  • Formatted SD card
March 16, 2011, at 02:55 PM by Scott Fitzgerald -
March 16, 2011, at 12:23 PM by Scott Fitzgerald -
Changed lines 36-37 from:
to:

(:include SDLibrarySeeAlsoIncludes :)

March 16, 2011, at 12:08 PM by Scott Fitzgerald -
Changed lines 24-28 from:

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.

In the loop(), a String is created to hold the information from three analog sensors. We iterate through the sensors, adding their data to the string.

Next, we open the file on the SD card using SD.open(). Once available, we write the data and close it to save the information.

to:

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.

In the loop(), a String is created to hold the information from three analog sensors. The code iterates through the sensors, adding their data to the string.

Next, the file on the SD card is opened by calling SD.open(). Once available, the data is written to the card when dataFile.println() is used. The file must be closed with dataFile.close() to save the information.

March 11, 2011, at 05:12 PM by Scott Fitzgerald -
Changed lines 18-19 from:
to:
Deleted lines 23-27:

Schematic

(:div class=circuit :)

(:divend:)

March 11, 2011, at 08:04 AM by Scott Fitzgerald -
Changed lines 29-31 from:

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.

to:

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.

In the loop(), a String is created to hold the information from three analog sensors. We iterate through the sensors, adding their data to the string.

Next, we open the file on the SD card using SD.open(). Once available, we write the data and close it to save the information.

February 23, 2011, at 06:16 PM by Scott Fitzgerald -
Changed lines 39-40 from:
to:
February 23, 2011, at 06:12 PM by Scott Fitzgerald - Page created
Added lines 1-39:

Examples > SD Datalogger

Using the SD library to log data

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 :)

Hardware Required

  • Three analog sensors
  • Arduino board
  • SD card board
  • Breadboard or prototyping Board

(:divend:)

Circuit

(:div class=circuit :)

image developed using Fritzing. For more circuit examples, see the Fritzing project page

(:divend:)

Schematic

(: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/Datalogger/Datalogger.pde lang=arduino tabwidth=4:) (:divend:)

See Also:




Bookmark and Share