Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
Aadil Work
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aadil M. Alli
Aadil Work
Commits
022e7639
Commit
022e7639
authored
Feb 09, 2023
by
Aadil M. Alli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Infared_Custom_Avoidance.py
parent
fc93b1a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
38 deletions
+0
-38
Infared_Custom_Avoidance.py
Infared_Custom_Avoidance.py
+0
-38
No files found.
Infared_Custom_Avoidance.py
deleted
100644 → 0
View file @
fc93b1a4
import
RPi.GPIO
as
GPIO
import
time
from
AlphaBot2
import
AlphaBot2
Ab
=
AlphaBot2
()
DR
=
16
DL
=
19
GPIO
.
setmode
(
GPIO
.
BCM
)
GPIO
.
setwarnings
(
False
)
GPIO
.
setup
(
DR
,
GPIO
.
IN
,
GPIO
.
PUD_UP
)
GPIO
.
setup
(
DL
,
GPIO
.
IN
,
GPIO
.
PUD_UP
)
try
:
while
True
:
DR_status
=
GPIO
.
input
(
DR
)
DL_status
=
GPIO
.
input
(
DL
)
print
(
"DR_status:"
,
DR_status
)
print
(
"DL_status:"
,
DL_status
)
# print(DR_status,DL_status)
if
(
DL_status
==
0
):
Ab
.
left
()
#Ab.right()
time
.
sleep
(
0.01
)
Ab
.
stop
()
# print("object")
elif
(
DR_status
==
0
):
Ab
.
right
()
time
.
sleep
(
0.01
)
Ab
.
stop
()
else
:
Ab
.
forward
()
# print("forward")
except
KeyboardInterrupt
:
GPIO
.
cleanup
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment