File management and Completed Part 1

This commit is contained in:
Thorsteinngretar
2026-10-03 02:41:04 +00:00
parent 0b52148272
commit 6f3c388cef
37 changed files with 1458 additions and 0 deletions
@@ -0,0 +1,28 @@
#ifndef ENCODER_H
#define ENCODER_H
#include <stdint.h>
#include <digital_in.h>
class Encoder
{
public:
Encoder(uint8_t c1Pin, uint8_t c2Pin);
void init();
void update();
int32_t position() const;
private:
Digital_in c1;
Digital_in c2;
uint8_t c1Pin;
bool previousC1;
volatile int32_t count;
};
#endif