Jump to content

Recommended Posts

Posted

Moin und ein gutes 2015 für alle  8)

 

@Tinkerforge: Bin gerade über eine kleine Sache in der Dokumentation gestolpert.

http://www.tinkerforge.com/de/doc/Software/Bricklets/IO4_Bricklet_Python.html#io4-bricklet-python-api

 

Dort stehen unter "IO4.set_configuration(selection_mask, direction, value)" folgende Zeilen:

 

(8, 'i', false) bzw. (0b1000, 'i', true) setzt Pin 3 als Standard Eingang (potentialfrei wenn nicht verbunden).

(3, 'o', false) bzw. (0b0011, 'i', true) setzt die Pins 0 und 1 als Ausgang im Zustand logisch 0.

(4, 'o', true) bzw. (0b0100, 'i', true) setzt Pin 2 als Ausgang im Zustand logisch 1.

 

Außerdem muss ich bei "meinem" Python (unter Windows) True bzw. False mit großem Anfangsbuchstaben schreiben.

Posted

Danke, ist gefixt. Das mit dem "true" ist schon OK so. Wenn in der Dokumentation von der API Codeschnipsel sind, ist das immer Pseudocode. Die Dokumentation existiert nur einmal und wird für alle Sprachen generiert, daher ist der Code an der Stelle nie sprachspezifisch.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...