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 99
1010*/
1111
12- // WIP
1312
1413#include " Arduino_AlvikCarrier.h"
1514
@@ -19,26 +18,23 @@ unsigned long tmotor=0;
1918unsigned long ttask=0 ;
2019uint8_t task=0 ;
2120float reference;
22- float position;
2321
2422void setup () {
2523 Serial.begin (115200 );
2624 alvik.begin ();
27- ttask = millis ();
28- tmotor = millis ();
2925 task = 0 ;
3026 reference = 0 ;
31- position = 0 ;
27+ ttask = millis ();
28+ tmotor = millis ();
3229}
3330
3431void loop () {
3532 if (millis ()-tmotor>20 ){
3633 tmotor = millis ();
3734 alvik.updateMotors ();
38- position = alvik.motor_control_left ->getPosition ();
3935 Serial.print (reference);
4036 Serial.print (" \t " );
41- Serial.print (position );
37+ Serial.print (alvik. getPositionLeft () );
4238 Serial.print (" \n " );
4339 }
4440
@@ -76,10 +72,10 @@ void loop() {
7672 reference = 10 ;
7773 break ;
7874 }
79- alvik.motor_control_left -> setPosition (reference);
75+ alvik.setPositionLeft (reference);
8076 task++;
8177 if (task>9 ){
82- task= 0 ;
78+ task = 0 ;
8379 }
8480 }
8581
You can’t perform that action at this time.
0 commit comments