Browse Source

changed library descriptor, nano compatible

pull/1/head
Lukas Bachschwell 1 year ago
parent
commit
2cb7977856
2 changed files with 9 additions and 3 deletions
  1. 1
    1
      library.properties
  2. 8
    2
      src/LARS.h

+ 1
- 1
library.properties View File

@@ -6,4 +6,4 @@ sentence=ESP32 Movement library for a simple 4 leg 8 servo crab like robot Libra
6 6
 paragraph=A library that creates simple commands for complex robotic movements of a 4 leg 8 servo crab when using the ESP32
7 7
 category=Signal Input/Output
8 8
 url=https://github.com/s00500/LARS
9
-architectures=ESP32
9
+architectures=*

+ 8
- 2
src/LARS.h View File

@@ -1,6 +1,12 @@
1 1
 #ifndef LARS_h
2 2
 #define LARS_h
3
-#include <ESP32_Servo.h>
3
+
4
+#if defined(ESP32)
5
+  #include <ESP32_Servo.h>
6
+#else
7
+  #include <Servo.h>
8
+#endif
9
+
4 10
 #include "Octosnake.h"
5 11
 
6 12
 // servo index to board_pins
@@ -20,7 +26,7 @@ class LARS {
20 26
   public:
21 27
     LARS();
22 28
     void init();
23
-    void walk(int dir = 1, float steps = 1, float T = 800); // T initial 400
29
+    void walk(int dir = 0, float steps = 1, float T = 800); // T initial 400
24 30
     void omniWalk(float steps, float T, bool side, float turn_factor);
25 31
     void turnL(float steps, float period);
26 32
     void turnR(float steps, float period);

Loading…
Cancel
Save