Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

IO16 - Python - io.get_port() fehlerhaft?

Featured Replies

Geschrieben

Hallo,

 

ich teste gerade ein wenig mit dem IO16 Modul, das gestern hier angekommen ist.

 

Bei Aufruf von io.get_port('b') erhalte ich einen Fehler bei io.get_port_configuration('b') jedoch nicht.

Traceback (most recent call last):
  File "./test.py", line 50, in <module>
    print io.get_port('b')
  File "/usr/local/lib/python2.7/dist-packages/tinkerforge.egg/tinkerforge/ip_connection.py", line 67, in func
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tinkerforge.egg/tinkerforge/bricklet_io16.py", line 46, in get_port
    return self.ipcon.write(self, IO16.TYPE_GET_PORT, (port,), 'c', 'B')
  File "/usr/local/lib/python2.7/dist-packages/tinkerforge.egg/tinkerforge/ip_connection.py", line 263, in write
    raise Error(Error.TIMEOUT, msg)
tinkerforge.ip_connection.Error: -1: Did not receive answer for message('b',)in time

 

Woran kann das liegen und wie lässt sich das lösen?

 

Grüße

Martin

Geschrieben

Den Fehler "tinkerforge.ip_connection.Error" kenne ich, wenn die Bricks/Bricklets nicht gefunden werden. Hast du mal einen reset auf dem Master Brick ausprobiert?

Geschrieben
  • Autor

Hi,

 

ja wenn ich die eine Zeile rausmach dann geht es, aber sobald ich die io.get_port('a') rein setz, gehts nicht mehr.

 

Da die IP Connection ansich funktioniert und alle anderen Funktion ebenfalls, sieht es für mich nach einem Problem speziell von dieser python Funktion aus. Da ich aber bis gestern kein bischen mit Python gemacht habe, bin ich mir da nicht ganz sicher ;)

 

Grüße

Martin

Geschrieben

io.get_port() funktioniert hier bei mir.

 

Als erstes solltest du einmal die Firmware des Bricklets neu flashen und dann noch mal testen.

 

Ansonsten hab ich keine anderen einfache Erklärung für das Problem zur Hand.

Geschrieben
  • Autor

Hallo,

 

ja, das hat geholfen, nachdem ich den IO16 geupdated habe, funktioniert nun auch io.get_port()

 

hätte ich auch ma selbst machen können ;)

 

Dankeschön

Grüße

Martin

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.