Jump to content

rtrbt

Administrators
  • Gesamte Inhalte

    1.406
  • Benutzer seit

  • Letzter Besuch

  • Tagessiege

    129

Alle erstellten Inhalte von rtrbt

  1. The rust bindings have left the beta phase and are now available on the Tinkerforge home page: https://www.tinkerforge.com/de/doc/Downloads.html
  2. Die Rust-Bindings haben die Betaphase verlassen und sind jetzt auf der Tinkerforge-Seite verfügbar: https://www.tinkerforge.com/de/doc/Downloads.html
  3. Hi, As of today, a beta version of the Go bindings is available. Please tinker around with them and post any bugs, suggestions and other feedback here. The current version of the bindings is attached to this post, including example sources. The bindings can also be installed with go get github.com/Tinkerforge/go-api-bindings There are no further dependencies except the Go compiler. The documentation on the Tinkerforge home page is not visible yet, as it is still work in progress, but a complete API documentation is available here Have a lot of fun! Erik Edit: I've attached version 2.0.1, which should also work on 32 bit systems (for example the Raspberry Pi). tinkerforge_go_bindings_2_0_1.zip
  4. Moin, Seit heite ist eine Beta-Version der Go-Bindings verfügbar. Experimentiert damit, wir freuen uns auf Feedback, Bugs und mehr. Die aktuellen Bindings, sowie Beispiele im examples-Ordner, sind angehangen. Die Bindings können auch mit go get github.com/Tinkerforge/go-api-bindings installiert werden. Außer dem Go-Compiler werden keine weiteren Abhängigkeiten benötigt. Die Dokumentation für die Tinkerforge-Seite ist noch in Arbeit und deshalb nicht sichtbar, es gibt aber hier eine vollständige Dokumentation der API. Viel Spaß! Erik Edit: Jetzt ist Version 2.0.1 angehangen, die auch auf 32-Bit-Systemen (z.b. dem Raspberry Pi) funktionieren sollte. tinkerforge_go_bindings_2_0_1.zip
  5. Das ist ein Bug in unserem Beispiel. Damit negative Temperaturen funktionieren, muss der Code wie folgt abgeändert werden: temperature1 = ('{:6.2f}'.format((t_low | (t_high << ) / 16.0)) muss stattdessen temperature1 = (t_low | (t_high << ) if temperature1 > 1 << 12: temperature1 -= 1 << 16 # Negative 12-bit values are sign-extended to 16-bit two's complement. temperature1 /= 16.0 # 12 bit mode measures in units of 1/16°C. temperature1 = '{:6.2f}'.format(temperature1) sein, bei temperature2 analog. Das Problem ist, dass der Temperatursensor eine 12 Bit lange Zahl in Zweier-Komplement-Form ausgibt (und die aufgeblasen auf 16 Bit, damit sie zwei Byte füllt). Das hat der Beispielcode bisher nicht beachtet. Ich behebe das mal in den Beispielen aller Sprachen.
  6. Hi, As of yesterday, a beta version of the rust bindings is available. Please tinker around with them and post any bugs, suggestions and other feedback here. The current version of the bindings is attached to this post, including example sources and an example project, which enumerates connected devices. The bindings can also be installed using Cargo by listing tinkerforge = "2.0" in the [dependencies] secion of a project's Cargo.toml. The bindings require a nightly version of the rust compiler, or the current beta release (version 1.31), which will be released as stable on the 7th of december, according to the road map. The beta can be installed with rustup install beta and then can be used with cargo +beta build. Also it is possible to set the beta as the default compiler with rustup default beta, which allows compiling without additional arguments. Nearly all get and set functions and callback registrations are asynchronous, as they return a wrapper around a Receiver, that converts received bytes into structured data. More information can be found in the binding's readme and here. The documentation on the Tinkerforge home page is not visible yet, as it is still work in progress. Have a lot of fun! Erik tinkerforge_rust_bindings_2_0_3.zip tf_rust_example.zip
  7. Moin, Seit gestern ist eine Beta-Version der Rust-Bindings verfügbar. Experimentiert damit, wir freuen uns auf Feedback, Bugs und mehr. Die aktuellen Bindings, sowie Beispiele im examples-Ordner, sind angehangen. Außerdem habe ich ein Beispielprojekt angehangen, das mit den Bindings alle angeschlossenen Bricks und Bricklets auflistet. Die Bindings können aber auch als Crate von Cargo installiert werden, wenn in der Cargo.toml tinkerforge = "2.0" unter den [dependencies] aufgeführt wird. Unterstützt werden nightly-Versionen des Rust-Compilers oder die aktuelle Beta 1.31, die laut der Roadmap ab 07.12. stabil sein wird. Diese kann mit rustup install beta installiert werden. Der Beta-Compiler kann dann mit cargo +beta build verwendet werden. Alternativ kann die Beta mit rustup default beta als Standardcompiler gesetzt werden, dann funkioniert cargo build ohne zusätzliche Argumente. Die Rust-Bindings funktionieren etwas anders als die meisten anderen Bindings, da fast alle Aufrufe nicht blockieren. Get/Set-Funktionen und Callback-Registrierungen liefern einen Wrapper um einen Receiver zurück, der die empfangenen Bytes in strukturierte Daten umwandelt. Weitere Details finden sich hier, sowie im Readme der Bindings. Die Dokumentation für die Tinkerforge-Seite ist noch in Arbeit und deshalb nicht sichtbar. Viel Spaß! Erik tinkerforge_rust_bindings_2_0_3.zip tf_rust_example.zip
×
×
  • Neu erstellen...