Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Main
All Projects
Main
Overview
Activity
Issues
Wiki
Files
Repository
Download (399 Bytes)
Statistics
| Branch:
master
| Tag:
RevA
RevB
| Revision:
root
/
525.743
/
code
/
test scripts
/
relay.py
@ e45aa19e
View
History
Annotate
import
sys
import
RPIO
def
main
():
if
len
(
sys
.
argv
)
<
2
:
print
'
Error, you must specify at least one argument
'
return
# Use the BCM addressing scheme
RPIO
.
setmode
(
RPIO
.
BCM
)
# Setup output
RPIO
.
setup
(
17
,
RPIO
.
OUT
)
if
sys
.
argv
[
1
]
==
'
1
'
:
RPIO
.
output
(
17
,
True
)
print
'
Relay on
'
else
:
RPIO
.
output
(
17
,
False
)
print
'
Relay off
'
if
__name__
==
'
__main__
'
:
sys
.
exit
(
main
())
« Previous
1
…
4
5
6
7
8
Next »
(6-6/8)
Loading...