forked from jameskabbes/HackIllinois2024
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da3d668
commit ec93cfe
Showing
2 changed files
with
40 additions
and
1 deletion.
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,39 @@ | ||
import numpy as np | ||
from src import motor as motor_module | ||
import time | ||
from src import led as led_module | ||
|
||
MOTOR_OFFSET = 0.65 | ||
|
||
if __name__ == '__main__': | ||
|
||
left_motor = motor_module.Motor({ | ||
"pins": { | ||
"speed": 13, | ||
"control1": 5, | ||
"control2": 6 | ||
} | ||
}) | ||
|
||
right_motor = motor_module.Motor({ | ||
"pins": { | ||
"speed": 12, | ||
"control1": 7, | ||
"control2": 8 | ||
}, | ||
}) | ||
|
||
led1 = led_module.LED({ | ||
"pin": 20 | ||
}) | ||
|
||
led2 = led_module.LED({ | ||
"pin": 21 | ||
}) | ||
|
||
dt = 0.25 | ||
left_motor.stop() | ||
right_motor.stop() | ||
led1.off() | ||
led2.off() | ||
time.sleep(dt) |
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