From fbfecae72fa970f2c0bf09e11a37fe0f93c875a5 Mon Sep 17 00:00:00 2001 From: Chris Merck Date: Fri, 22 Apr 2016 21:27:10 -0400 Subject: [PATCH] CW mode --- cw.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cw.py b/cw.py index 525b6c6..fff20e1 100644 --- a/cw.py +++ b/cw.py @@ -41,9 +41,9 @@ def __init__(self,_serial_port,_dev_addr): # timeout for write self._ser.writeTimeout = 0 - #print "Resetting LoRa Tranceiver..." + print "Resetting LoRa Tranceiver..." self.write_command('sys reset',False) - #print "Configuring Tranceiver..." + print "Configuring Tranceiver..." self.write_command('radio set mod lora') self.write_command('mac pause') @@ -60,7 +60,7 @@ def write(self, str): self._ser.write(str + '\r\n') return self.read() - def write_command(self, config_str, check_resp=False): + def write_command(self, config_str, check_resp=True): ''' writes out a command ''' @@ -103,19 +103,27 @@ def receive_message(self): while True: print "Sending V..." loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(2) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.5)