def stop(self):
    print('Stopping streaming...')
    self.streaming = False
    try:
        if self.impedance:
            print('Stopping with impedance testing')
            self.wifi_write('Z')
        else:
            self.wifi_write('s')
    except Exception as e:
        print(('Something went wrong while asking the board to stop streaming: ' + str(e)))
    if self.log:
        logging.warning('sent <s>: stopped streaming')
def stop(self):
    print('Stopping streaming...')
    self.streaming = False
    try:
        if self.impedance:
            print('Stopping with impedance testing')
            self.wifi_write('Z')
        else:
            self.wifi_write('s')
    except Exception as e:
        print(('Something went wrong while asking the board to stop streaming: ' + str(e)))
    if self.log:
        logging.warning('sent <s>: stopped streaming')