summaryrefslogtreecommitdiff
path: root/esp/src/as5600.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'esp/src/as5600.cpp')
-rw-r--r--esp/src/as5600.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/esp/src/as5600.cpp b/esp/src/as5600.cpp
index e69de29..1dfdb71 100644
--- a/esp/src/as5600.cpp
+++ b/esp/src/as5600.cpp
@@ -0,0 +1,13 @@
+#include <Wire.h>
+#include <AS5600.h>
+#include "as5600.h"
+
+AS5600 as5600;
+
+void setupAS5600() {
+ as5600.begin(21, 22);
+}
+
+float lerAS5600() {
+ return as5600.readAngle();
+}