aboutsummaryrefslogtreecommitdiff
path: root/zumo
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-05-24 15:51:25 +0200
committerlonkaars <loek@pipeframe.xyz>2023-05-24 15:51:25 +0200
commit4568db72dc3f9694ecae3506fc3de6ffc948b24f (patch)
tree9bd15762ff9bfe4143ec74e2684c42985b8b4d3b /zumo
parentd53f4014ab90dc09f6b9fff68391fc90a084de59 (diff)
WIP zumo<-nicla communication
Diffstat (limited to 'zumo')
-rw-r--r--zumo/zumo.ino7
1 files changed, 5 insertions, 2 deletions
diff --git a/zumo/zumo.ino b/zumo/zumo.ino
index f59bd36..c65c2f9 100644
--- a/zumo/zumo.ino
+++ b/zumo/zumo.ino
@@ -5,6 +5,9 @@
#include "protocol.h"
#include "pid.h"
+#define DUI_PINOUT_NICLA_TX 13
+#define DUI_PINOUT_NICLA_RX 14
+
dui_state_t g_dui_target_state = {
.steer = 1.0f,
.speed = 1.0f,
@@ -19,6 +22,8 @@ dui_state_t g_dui_current_state = {
};
void setup() {
+ pinMode(DUI_PINOUT_NICLA_TX, OUTPUT);
+ pinMode(DUI_PINOUT_NICLA_RX, INPUT_PULLUP);
}
void loop() {
@@ -29,6 +34,4 @@ void loop() {
apply_pid(&g_dui_target_state, &g_dui_current_state);
apply_state(&g_dui_current_state);
-
- delay(10);
}