-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from gbr1/dev
0.1.0
- Loading branch information
Showing
33 changed files
with
1,731 additions
and
1,573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Arduino_Robot_Firmware | ||
firmware | ||
# Arduino_AlvikCarrier | ||
|
||
|
||
W.I.P. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
This file is part of the Arduino_AlvikCarrier library. | ||
Copyright (c) 2023 Arduino SA | ||
This Source Code Form is subject to the terms of the Mozilla Public | ||
License, v. 2.0. If a copy of the MPL was not distributed with this | ||
file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
// WIP | ||
|
||
#include "Arduino_AlvikCarrier.h" | ||
|
||
Arduino_AlvikCarrier alvik; | ||
|
||
unsigned long tmotor=0; | ||
unsigned long ttask=0; | ||
uint8_t task=0; | ||
|
||
void setup() { | ||
Serial.begin(115200); | ||
alvik.begin(); | ||
ttask=millis(); | ||
tmotor=millis(); | ||
task=0; | ||
} | ||
|
||
void loop() { | ||
if (millis()-tmotor>20){ | ||
tmotor=millis(); | ||
alvik.updateMotors(); | ||
alvik.kinematics->updatePose(alvik.motor_control_left->getTravel(), alvik.motor_control_right->getTravel()); | ||
Serial.print("\t"); | ||
Serial.print(alvik.kinematics->getDeltaX()); | ||
Serial.print("\t"); | ||
Serial.print(alvik.kinematics->getDeltaY()); | ||
Serial.print("\t"); | ||
Serial.print(alvik.kinematics->getTheta()); | ||
Serial.print("\n"); | ||
} | ||
|
||
if (millis()-ttask>2000){ | ||
ttask=millis(); | ||
switch (task){ | ||
case 0: | ||
alvik.drive(50,0); | ||
break; | ||
case 1: | ||
alvik.drive(0,0); | ||
break; | ||
case 2: | ||
alvik.drive(0,-90); | ||
break; | ||
case 3: | ||
alvik.drive(0,0); | ||
break; | ||
} | ||
task++; | ||
if (task>3){ | ||
task=0; | ||
} | ||
} | ||
|
||
} |
Binary file not shown.
Oops, something went wrong.