def set_accelerometer(self, toggle_position):
    ' Enable / disable accelerometer '
    try:
        if (self.board_type == k.BOARD_GANGLION):
            if (toggle_position == 1):
                self.wifi_write('n')
            elif (toggle_position == 0):
                self.wifi_write('N')
        else:
            print('Board type not supported for setting accelerometer')
    except Exception as e:
        print(('Something went wrong while setting accelerometer: ' + str(e)))
Enable / disable accelerometer
def set_accelerometer(self, toggle_position):
    '  '
    try:
        if (self.board_type == k.BOARD_GANGLION):
            if (toggle_position == 1):
                self.wifi_write('n')
            elif (toggle_position == 0):
                self.wifi_write('N')
        else:
            print('Board type not supported for setting accelerometer')
    except Exception as e:
        print(('Something went wrong while setting accelerometer: ' + str(e)))