File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 9
9
10
10
*/
11
11
12
- // WIP
13
12
14
13
#include " Arduino_AlvikCarrier.h"
15
14
@@ -19,26 +18,23 @@ unsigned long tmotor=0;
19
18
unsigned long ttask=0 ;
20
19
uint8_t task=0 ;
21
20
float reference;
22
- float position;
23
21
24
22
void setup () {
25
23
Serial.begin (115200 );
26
24
alvik.begin ();
27
- ttask = millis ();
28
- tmotor = millis ();
29
25
task = 0 ;
30
26
reference = 0 ;
31
- position = 0 ;
27
+ ttask = millis ();
28
+ tmotor = millis ();
32
29
}
33
30
34
31
void loop () {
35
32
if (millis ()-tmotor>20 ){
36
33
tmotor = millis ();
37
34
alvik.updateMotors ();
38
- position = alvik.motor_control_left ->getPosition ();
39
35
Serial.print (reference);
40
36
Serial.print (" \t " );
41
- Serial.print (position );
37
+ Serial.print (alvik. getPositionLeft () );
42
38
Serial.print (" \n " );
43
39
}
44
40
@@ -76,10 +72,10 @@ void loop() {
76
72
reference = 10 ;
77
73
break ;
78
74
}
79
- alvik.motor_control_left -> setPosition (reference);
75
+ alvik.setPositionLeft (reference);
80
76
task++;
81
77
if (task>9 ){
82
- task= 0 ;
78
+ task = 0 ;
83
79
}
84
80
}
85
81
You can’t perform that action at this time.
0 commit comments