2#include <libtock-sync/services/alarm.h>
6 ulog_info(
"ADS1219 Example");
10 ulog_error(
"Failed to initialize ADS1219");
14 ulog_info(
"ADS1219 initialized successfully");
23 ulog_info(
"Voltage: %d mV", (
int)(voltage * 1000));
25 ulog_error(
"Failed to read voltage");
30 ulog_info(
"Current: %d mV", (
int)(current * 1000));
32 ulog_error(
"Failed to read current");
35 libtocksync_alarm_delay_ms(2000);
This file contains all the function prototypes for the ads.c file.
int ads1219_current(double *current)
This function reads the current ADC ampere value.
int ads1219_reset(void)
This function starts up the ADS1219.
int ads1219_voltage(double *voltage)
This function reads the current ADC voltage value.