Commit ec925487 authored by Nelso Jost's avatar Nelso Jost

ADD: help message for make serial

parent 6e0a2281
...@@ -4,6 +4,7 @@ import time ...@@ -4,6 +4,7 @@ import time
from app import Meteorologger from app import Meteorologger
ser = Meteorologger().get_serial() ser = Meteorologger().get_serial()
time.sleep(2) # waiting for board reset
def send(command_str, response_wait=0): def send(command_str, response_wait=0):
''' '''
...@@ -17,7 +18,16 @@ def send(command_str, response_wait=0): ...@@ -17,7 +18,16 @@ def send(command_str, response_wait=0):
except: except:
print("Unable do decode raw line read:\n{}".format(raw)) print("Unable do decode raw line read:\n{}".format(raw))
print("\nExecuting send('help') ... waiting for board response ...") print("\nSending 'help' to the serial... waiting for board response ...")
s = send('help') response = send('help')
s = send('help') print("\nCommands available:\n" + '-'*40 + '\n' + response + '\n' + '-'*40)
print('\n' + s) 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
""")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment