Solar panel
Loading...
Searching...
No Matches
measure.h File Reference

Measuring current and voltage from the solar panel. More...

#include <stdint.h>

Go to the source code of this file.

Functions

void adc_init (void)
 
uint16_t measure_voltage (void)
 
uint16_t measure_current (uint16_t offset)
 

Detailed Description

Measuring current and voltage from the solar panel.

Definition in file measure.h.

Function Documentation

◆ adc_init()

void adc_init ( void  )

Initialize ADC and pins for measuring current and voltage

Definition at line 16 of file measure.c.

◆ measure_current()

uint16_t measure_current ( uint16_t  offset)

Measure the current on the solar panel. This function is expected to do some filtering

Parameters
offset: the offset as measured by measure_current_offset
Returns
the current in microamperes

Definition at line 49 of file measure.c.

◆ measure_voltage()

uint16_t measure_voltage ( void  )

Measure the voltage on the channel for the current. This function is expected to do some filtering.

Returns
The offset

Definition at line 37 of file measure.c.