/Modules/Memory/SDcard01B/SW/Arduino/datalogger/datalogger.pde
1,5 → 1,5
/*
SD card datalogger
SD card datalogger
This example shows how to log data from three analog sensors
to an SD card using the SD library.
7,15 → 7,21
The circuit:
* analog sensors on analog ins PC0, PC1, and PC2
* SD card attached to SPI bus as follows:
** MOSI/CMD - PB3
** MISO/DAT0 - PB4
** MOSI - PB3
** MISO - PB4
** CLK - PB5
** CD/DAT3 - PD4
** CS - PD4
created 24 Nov 2010
updated 2 Dec 2010
by Tom Igoe
This example code is in the public domain.
*/
 
#include <SD.h>
#define chipSelect 4
const int chipSelect = 4;
 
void setup()
{
40,7 → 46,7
{
 
// make a string for assembling the data to log:
String dataString = "$LOG";
String dataString = "$";
delay(100);
dataString += String(count); // print number of measurement
dataString += ",";