-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/AlanWang611/SET2023
- Loading branch information
Showing
4 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
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
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,4 +1,11 @@ | ||
import "./wheels.py" | ||
from wheels import Wheels | ||
|
||
# Instantiate the Wheels class with your port number | ||
myFirstWheel = Wheels("COM5") | ||
|
||
# Test movement commands | ||
myFirstWheel.goForward(100) # Go forward 100 units | ||
# myFirstWheel.goBackward("50") # Go backward 50 units | ||
# myFirstWheel.turnRight("90") # Turn right by 90 degrees | ||
# myFirstWheel.turnLeft("45") # Turn left by 45 degrees | ||
|
||
w = Wheels("COM4") | ||
w.move("100100") |