ALog  v0.3.2
Open-source Arduino-based data logger library, designed for field science
Macros | Functions | Variables
ALog.cpp File Reference
#include <ALog.h>
Include dependency graph for ALog.cpp:

Macros

#define cbi(sfr, bit)   (_SFR_BYTE(sfr) &= ~_BV(bit))
 
#define sbi(sfr, bit)   (_SFR_BYTE(sfr) |= _BV(bit))
 

Functions

void wakeUpNow ()
 
void wakeUpNow_tip ()
 
void _ISR_void ()
 
void _anemometer_count_increment ()
 
void save_Aref (float _V)
 
float read_Aref ()
 
void _internalDateTime (uint16_t *date, uint16_t *time)
 

Variables

const bool h12 = false
 
uint8_t hourInterval
 
uint8_t minInterval
 
uint8_t secInterval
 
uint8_t _hours
 
uint8_t _minutes
 
uint8_t _seconds
 
bool _use_sleep_mode = true
 
bool CAMERA_IS_ON = false
 
bool IS_LOGGING = false
 
char * datafilename
 
char * logger_name
 
bool extInt
 
bool NEW_RAIN_BUCKET_TIP = false
 
bool LOG_ALL_SENSORS_ON_BUCKET_TIP
 
bool first_log_after_booting_up = true
 
uint8_t rotation_count = 0
 
RTClib RTC
 
DS3231 Clock
 
SdFat sd
 
SdFile datafile
 
SdFile otherfile
 
SdFile headerfile
 
DateTime now
 

Detailed Description

Data logger library Designed for the ALog Modules should work for any Arduino-based board with minimal modificiation Goals: (1) Manage logger utility functions, largely behind-the-scenes (2) Simplify data logger operations to one-line calls

Written by Andy Wickert, 2011-2017, and Chad Sandell, 2016-2017 Started 27 September 2011

Designed to greatly simplify Arduino sketches for the ALog and reduce what the end user needs to do into relatively simple one-line calls.

LICENSE: GNU GPL v3

ALog.cpp is part of ALog, an Arduino library written by Andrew D. Wickert and Chad T. Sandell Copyright (C) 2011-2017, Andrew D. Wickert Copyright (C) 2016-2017, Chad T. Sandell Copyright (C) 2016-2017, Regents of the University of Minnesota

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ read_Aref()

float read_Aref ( )

Read the analog (ADC) sensor reference voltage from EEPROM, return float.

ADC == analog-digital comparator EEPROM = permanent memory (persists after shutdown) See: https://www.arduino.cc/en/Reference/EEPROMGet

Example:

float Vref;
Vref = alog.readAref();

◆ save_Aref()

void save_Aref ( float  _V)

Saves a float as the reference voltage for the ADC ("Vref") to the EEPROM

ADC == analog-digital comparator EEPROM = permanent memory (persists after shutdown) See: https://www.arduino.cc/en/Reference/EEPROMPut

This function is only called rarely, as this value is typically measured only once.

Parameters
_Vreference voltage, ideally measured under load [V]

Example:

// Measuring 3.297V with a calibrated multimeter between 3V3 and GND
// Then:
alog.saveAref(3.297);