Prototyp V2

Dependencies:   PM2_Libary

Files at this revision

API Documentation at this revision

Comitter:
raomen
Date:
Sat May 14 13:01:56 2022 +0200
Parent:
106:9c80285b97aa
Commit message:
changed Motor_arm counts_per_turn

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 9c80285b97aa -r 6b613385443e main.cpp
--- a/main.cpp	Sat May 14 12:13:02 2022 +0200
+++ b/main.cpp	Sat May 14 13:01:56 2022 +0200
@@ -54,7 +54,7 @@
 // create SpeedController and PositionController objects, default parametrization is for 78.125:1 gear box
 const float max_voltage               = 12.0f;     // define maximum voltage of battery packs, adjust this to 6.0f V if you only use one batterypack
 const float counts_per_turn_wheels    = 20.0f * 78.125f;    // define counts per turn at gearbox end (counts/turn * gearratio) for wheels
-const float counts_per_turn_arm       = 20.0f * 78.125f * 20.0f;    // define counts per turn at gearbox end (counts/turn * gearratio) for arm
+const float counts_per_turn_arm       = 20.0f * 78.125f * 100.0f;    // define counts per turn at gearbox end (counts/turn * gearratio) for arm
 const float kn                        = 180.0f / 12.0f;      // define motor constant in rpm per V
 const float k_gear                    = 100.0f / 78.125f;   // define additional ratio in case you are using a dc motor with a different gear box, e.g. 100:1 (DC with 100:1 has 2'000 turns for 360°)
 const float kp                        = 0.1f;     // define custom kp, this is the default speed controller gain for gear box 78.125:1