Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
ring
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
ring
Commits
4918589b
Commit
4918589b
authored
3 years ago
by
Neil Gershenfeld (test)
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
4b463abe
No related branches found
No related tags found
No related merge requests found
Pipeline
#10865
passed
3 years ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GPIO/RPi.GPIO/ring.RPi.GPIO.py
+24
-0
24 additions, 0 deletions
GPIO/RPi.GPIO/ring.RPi.GPIO.py
GPIO/gpiozero/ring.gpiozero.py
+21
-0
21 additions, 0 deletions
GPIO/gpiozero/ring.gpiozero.py
with
45 additions
and
0 deletions
GPIO/RPi.GPIO/ring.RPi.GPIO.py
0 → 100644
+
24
−
0
View file @
4918589b
#
# ring.RPi.GPIO.py
# Raspberry Pi RPI.GPIO ring oscillator test
#
# Neil Gershenfeld 3/21/21
#
# This work may be reproduced, modified, distributed,
# performed, and displayed for any purpose, but must
# acknowledge this project. Copyright is retained and
# must be preserved. The work is provided as is; no
# warranty is provided, and users accept all liability.
#
import
RPi.GPIO
as
GPIO
pinout
=
16
pinin
=
18
GPIO
.
setwarnings
(
False
)
GPIO
.
setmode
(
GPIO
.
BOARD
)
GPIO
.
setup
(
pinout
,
GPIO
.
OUT
)
GPIO
.
setup
(
pinin
,
GPIO
.
IN
)
while
(
True
):
if
(
GPIO
.
input
(
pinin
)
==
GPIO
.
LOW
):
GPIO
.
output
(
pinout
,
GPIO
.
HIGH
)
else
:
GPIO
.
output
(
pinout
,
GPIO
.
LOW
)
This diff is collapsed.
Click to expand it.
GPIO/gpiozero/ring.gpiozero.py
0 → 100644
+
21
−
0
View file @
4918589b
#
# ring.gpiozero.py
# Raspberry Pi gpiozero ring oscillator test
#
# Neil Gershenfeld 3/21/21
#
# This work may be reproduced, modified, distributed,
# performed, and displayed for any purpose, but must
# acknowledge this project. Copyright is retained and
# must be preserved. The work is provided as is; no
# warranty is provided, and users accept all liability.
#
from
gpiozero
import
LED
from
gpiozero
import
Button
led
=
LED
(
23
)
button
=
Button
(
24
)
while
(
True
):
if
button
.
is_pressed
:
led
.
on
()
else
:
led
.
off
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment