Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
robogroup
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
matteo perini
robogroup
Commits
db29311c
Commit
db29311c
authored
Jan 17, 2025
by
matteo perini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
esempi servo e led
parent
5cb86003
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
ledd.py
ledd.py
+8
-2
prova4.py
prova4.py
+32
-0
servo.py
servo.py
+12
-0
No files found.
ledd.py
View file @
db29311c
from
gpiozero
import
LED
from
time
import
sleep
led
=
LED
(
27
)
led
=
LED
(
"BOARD40"
)
led2
=
LED
(
19
)
while
True
:
led
.
on
()
led2
.
off
()
sleep
(
1
)
led
.
off
()
led
.
off
()
#accendo il primo led
led2
.
on
()
sleep
(
1
)
prova4.py
0 → 100644
View file @
db29311c
import
RPi.GPIO
as
GPIO
from
mfrc522
import
SimpleMFRC522
from
gpiozero
import
LED
attiva
=
LED
(
5
)
disattiva
=
LED
(
6
)
def
identificati
():
try
:
reader
=
SimpleMFRC522
()
print
(
"Ciao, avvicina il tag RFID al ricevitore!"
)
id
,
text
=
reader
.
read
()
print
(
id
)
#print(text)
except
:
pass
finally
:
GPIO
.
cleanup
()
return
str
(
id
)
a
=
True
while
a
:
attiva
.
off
()
disattiva
.
on
()
codice
=
identificati
()
if
codice
==
"357675773210"
:
print
(
"suona"
)
a
=
False
servo.py
0 → 100644
View file @
db29311c
from
gpiozero
import
Servo
from
time
import
sleep
s
=
Servo
(
4
)
while
True
:
s
.
min
()
sleep
(
2
)
s
.
mid
()
sleep
(
2
)
s
.
max
()
sleep
(
2
)
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