summaryrefslogtreecommitdiff
path: root/debug/motordriver/calibrated_motor
diff options
context:
space:
mode:
authorAbel Tim <abel@main.home>2024-07-07 11:03:07 +0200
committerAbel Tim <abel@main.home>2024-07-07 11:03:07 +0200
commit230b3c7db6c2dbb38aa987e52d31e13804300731 (patch)
treef5541c67ec5085814e42eb23fd74355db064dcc2 /debug/motordriver/calibrated_motor
parent1e9c0466ff5af12735f3c7330e961867030c0110 (diff)
downloadrobotica-230b3c7db6c2dbb38aa987e52d31e13804300731.tar.gz
robotica-230b3c7db6c2dbb38aa987e52d31e13804300731.zip
Motor driver code complette need to test/fix MCP23017
Diffstat (limited to 'debug/motordriver/calibrated_motor')
-rw-r--r--debug/motordriver/calibrated_motor/calibrated_motor.ino6
1 files changed, 4 insertions, 2 deletions
diff --git a/debug/motordriver/calibrated_motor/calibrated_motor.ino b/debug/motordriver/calibrated_motor/calibrated_motor.ino
index 9367f2a..60e2c04 100644
--- a/debug/motordriver/calibrated_motor/calibrated_motor.ino
+++ b/debug/motordriver/calibrated_motor/calibrated_motor.ino
@@ -1,6 +1,4 @@
#include <TimerThree.h>
-#include <SD.h>
-#include <SPI.h>
#define ArrayElementCount(needRPM) (sizeof(needRPM) / sizeof(needRPM[0]))
@@ -108,6 +106,10 @@ void move(int sped) {
}
//Serial.println(sp);
}
+void RPMmove(int Rsped) {
+ int idx = nearest(Rsped, motordata, ArrayElementCount(motordata));
+ move(idx);
+}
void loop() {