piconomix-fwlib  0.7.1
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers
Temp&Pressure Data Logger Application

1. Introduction

This is a temperature and pressure data logger app for the Piconomix ATmega328P Scorpion Board. An Electrodragon BMP280 breakout board must be connected via the breakout header. See CLI Explorer, I2C section for an easy test to verify that it has been wired correctly.

scorpion_board_i2c_slave_bmp280.jpg
Electrodragon BMP280 breakout board connected to I2C

Reference:

Here is an example of collected data:

log_temp_pressure_graph.png
Temperature & Pressure graph

2. Command examples

Basic use of the Command Line Interpreter is documented here

Type 'help' to list commands with parameters and descriptions:

>help
m                                     : Measure temperature and barometric pressure.

log s                                 : Start logging
log ls                                : List logs
log dump <number>                     : Dump log
log del                               : Delete all logs

rtc r                                 : Read RTC time
rtc w    <yy-mm-dd> <hh:mm:ss>        : Write RTC time

fs info                               : Report file system info
fs ls                                 : List files

sf info                               : Report Serial Flash info
sf e     [start page] [end page]      : Erase Serial Flash page(s)
sf r     <adr> <nr of bytes>          : Read Serial Flash data
sf rp    <page>                       : Read Serial Flash page
sf rx    [start page] [end page]      : Read Serial Flash data and send using XMODEM
sf wp    <page> <offset> <d0> .. [d7] : Write up to 8 bytes of data to Serial Flash
sf wx    [start page]                 : Receive data using XMODEM and write to Serial Flash

help     [cmd(s) starts with...]      : Display list of commands with help. Optionally the list can be reduced.

Type 'm' to perform a single temperature and pressure measurement:

>m
Temp = 1766, Pressure = 101615

Type 'rtc w <yy-mm-dd hh:mm:ss>' to set the date and time:

>rtc w 14-09-07 15:28:58

Type 'log s' to start logging (every half hour):

>log s
00000   14-09-07        15:30   222     100377
00001   14-09-07        16:00   210     100376
00002   14-09-07        16:30   205     100392

Press SPACE or press the button on the board to stop.

Type 'log ls' to list log(s):

>log ls
File 1 [14-09-07 15:21:23]

Type 'log dump 1' to dump the content of the first log:

>log dump 1
File 1 [14-09-07 15:21:23]
00000   14-09-07        15:30   222     100377
00001   14-09-07        16:00   210     100376
00002   14-09-07        16:30   205     100392
00003   14-09-07        17:00   207     100379
00004   14-09-07        17:30   208     100439
00005   14-09-07        18:00   207     100452
00006   14-09-07        18:30   206     100502
00007   14-09-07        19:00   203     100552
00008   14-09-07        19:30   202     100587
00009   14-09-07        20:00   200     100619
00010   14-09-07        20:30   199     100614

Type 'log del' to delete all logs:

>log del
Deleted 1 files