Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Manchev
osie
Commits
4939ec20
Commit
4939ec20
authored
4 years ago
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switchon / off for a day (stupid test to check relays work.
parent
8ba4ae28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
examples/lime2-mod-io-relay-on_off.py
examples/lime2-mod-io-relay-on_off.py
+10
-6
No files found.
examples/lime2-mod-io-relay-on_off.py
View file @
4939ec20
...
...
@@ -83,13 +83,17 @@ import time
i2c
.
init
(
"/dev/i2c-1"
)
i2c
.
open
(
0x58
)
# switch ON RELAY1
i2c
.
write
([
0x10
,
0x01
])
for
i
in
range
(
0
,
25
):
# switch ON RELAY1
i2c
.
write
([
0x10
,
0x01
])
print
(
"On"
)
time
.
sleep
(
2
)
print
(
"Off"
)
for
i
in
range
(
0
,
30
*
60
*
24
):
# switch OFF RELAY1
i2c
.
write
([
0x10
,
0x00
])
time
.
sleep
(
2
)
# switch ON RELAY1
i2c
.
write
([
0x10
,
0x01
])
time
.
sleep
(
1
)
This diff is collapsed.
Click to expand it.
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