<< Click to Display Table of Contents >> Data logger |
|
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)
(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.
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.