Clone this wiki locally
How to use SDLogger as an Arduino board
First read Arduino - Getting Started for general information about how to download, install and use Arduino. In order to use SDLogger as an Arduino board a few additional steps are needed (download and copy the SDLogger arduino code into the arduino install directory).
- Download and install the Arduino environment (arduino-0021) from the Arduino download page.
- Download SDLogger code repository from https://github.com/magnuskarlsson/SDLogger and extract.
- Copy folder SDLogger\arduino-0021\hardware\SDLogger to <arduino_install_dir>\arduino-0021\hardware
- Copy folder SDLogger\arduino-0021\libraries\SdFat to <arduino_install_dir>\arduino-0021\libraries
- Copy folder SDLogger\arduino-0021\examples\SDLogger to <arduino_install_dir>\arduino-0021\examples
- Start the Arduino application
- Connect the SDLogger board to the computer. See FTDI-cable Howto for one way to do this.
- Install the driver. See Arduino - Getting Started for more information about driver install.
- In the "Tools->Board" pulldown menu select "SDLogger" (or "SDLogger with buffered serial Tx")
- In the "Tools->Serial Port" pulldown menu select the port of the SDLogger board
To verify the environment, try to compile and upload one of the examples in the SdFat library:
- In the "Files->Examples->SdFat" pulldown menu select "SdFatAnalogLogger"
- In the new "SdFatAnalogLogger" window press the Upload button, this will compile and upload the code to the SDLogger board
- Connect to the SDLogger board using a terminal program (like HyperTerminal or PuTTy) set to the same port as step 10 above at 9600 baud.
- Insert a formatted SD-card in the SDLogger and start the logging by pressing any key
If this test is successful then the environment is ready to use.
See "Files->Examples->SDLogger" for other code examples
Arduino pin mapping:
- Green LED is digital 0
- Red LED is digital 1
- RX2 is digital 10 (or part of Serial1)
- TX2 is digital 11 (or part of Serial1)
- SCL is digital 16 (or part of I2C)
- SDA is digital 17 (or part of I2C)
- SD-card socket CD switch is digital 18
- SD-card socket WP switch is digital 19
- AIN0 is digital 31 or analog 0
- AIN1 is digital 30 or analog 1
- AIN2 is digital 29 or analog 2
- AIN3 is digital 28 or analog 3
Note that the input/output voltage is 3.3V!