Data logger

<< Click to Display Table of Contents >>

Navigation:  nRF51 Target > Demos > SPI >

Data logger

Previous pageReturn to chapter overviewNext page

Demo File: datalogger_sdcard.mdl

Location: <waijungroot>\targets\nrf51_target\nrf51\demo\filestream\

Target: RTW (Build and Download this demo file into the nRF51 Target board)


Items description:

(1) - ADC reading block, conversion input signal from AIN7 and internal VDD level.

(2) - Translate the ADC reading value to voltage.

(3) - Converter reading voltage to string (vector data) with "sprintf".

(4) - Specify data logger file name.

(5) - Specify start position for write data, 1: append.

(6) - Get string length.

(7) - Specify file close behavior, 1: close on every log transaction.

(8) - Write data to file.

(9) - Also transmit the reading data to UART port.


The demo showing a simple data logger, log the reading data on SD card and also transmit to UART port.

Hardware setup

See Hardware Setup.


1. Remove SD card from SD card socket.

2. Build the demo model to the FiO Glide board (as specified in Hardware Setup).

3. Disconnect USB (disconnect DC power from the board).

4. Insert SD card to socket.

5. Connect USB to the board, data logger will be start.

6. Wait 10 second for data.

7. Stop logging process, by disconnect USB from the board.

8. Open file data.txt



During data logger is running, it also transmit the data to UART port.