Skip to content

Instantly share code, notes, and snippets.

View magdel's full-sized avatar

Pavel magdel

View GitHub Profile
@magdel
magdel / average8.c
Created May 3, 2025 12:44
Average value read from pin in Arduino
// Struct to hold values and know average
struct AVG_8_VALUE {
uint16_t values[8];
uint8_t position;
uint16_t average;
bool ready;
};
/// @brief Add value to average
/// @param avg average struct