Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EMM
meteorolog
Commits
ec925487
Commit
ec925487
authored
Jul 16, 2015
by
Nelso Jost
Browse files
ADD: help message for make serial
parent
6e0a2281
Changes
1
Hide whitespace changes
Inline
Side-by-side
logger/init_serial.py
View file @
ec925487
...
...
@@ -4,6 +4,7 @@ import time
from
app
import
Meteorologger
ser
=
Meteorologger
().
get_serial
()
time
.
sleep
(
2
)
# waiting for board reset
def
send
(
command_str
,
response_wait
=
0
):
'''
...
...
@@ -17,7 +18,16 @@ def send(command_str, response_wait=0):
except
:
print
(
"Unable do decode raw line read:
\n
{}"
.
format
(
raw
))
print
(
"
\n
Executing send('help') ... waiting for board response ..."
)
s
=
send
(
'help'
)
s
=
send
(
'help'
)
print
(
'
\n
'
+
s
)
print
(
"
\n
Sending 'help' to the serial... waiting for board response ..."
)
response
=
send
(
'help'
)
print
(
"
\n
Commands available:
\n
"
+
'-'
*
40
+
'
\n
'
+
response
+
'
\n
'
+
'-'
*
40
)
print
(
"""
\
You are now inside the Python interpreter! The commands above
must be passed as a string to the send() function!
Examples:
>>> send('read,t,l') # to read both temperature and luminosity
>>> send('setrtc,2015,7,15,17,45,0') # set the real time clock, if present
"""
)
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