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.

photron

Administrators

Alle erstellten Inhalte von photron

  1. In the prototype the CallbackThread doesn't wait for the dispatch of the callbacks. In contrast to the released Java bindings that do synchronous dispatch. Asynchronous dispatch should be okay, but it could change the external behavior of the bindings, which may or may not be a problem. Currently I cannot think of any critical problem with asynchronous dispatch except one. The current reconnect logic in the CallbackThread requires the callDisconnectedListeners() method to dispatch the callback synchronously. But this could be fixed. With the prototype the reconnect logic runs in your event logic, instead of the CallbackThread. In a final version this would have to be changed. You might be right, this gets complex fast. So the much simpler approach could be to make the call*Listener() methods protected so you can override them as you suggested. Then I could also make the API contract for this methods says that you have to do synchronous dispatch. Maybe something like this naive approach (creating semaphores might be expensive): protected void callDeviceListener(final Device device, final byte functionID, final byte[] data) { final Semaphore semaphore = new Semaphore(0); EventQueue.invokeLater(new Runnable() { IPConnection.callDeviceListener(device, functionID, data); semaphore.release(); } semaphore.acquire(); } Then you have to do all the hard work. That's okay for me As a side note: The IPConnection class is split into IPConnectionBase and IPConnection because the Java bindings are used with some modifications as MATLAB/Octave bindings. This is why the call*Listener() methods are abstract in IPConnectionBase and the actual implementation is in different IPConnection classes. This allows the MATLAB/Octave bindings to implement them in the proper way for MATLAB/Octave. Attached is a second simpler prototype for your override suggestion. Edit: I cannot see any problem with this override approach. The order of execution in the bindings doesn't change. Only the callback dispatch might be slightly delayed because of the round trip through your event loop, but that should not be a problem at all. tinkerforge_java_bindings_2_1_2_b3f88827594183802a72f623c4dfcdeb7e3c33f7+2_simpler.zip
  2. It's not that simple. The internals of the IPConnection have to work in certain ways. We cannot just replace the whole CallbackThread with a user controlled construct, because the CallbackThread does more than just dispatching callback, it's responsible for some internal book keeping. The CallbackThread has to stay. But we could add an "inofficial" CallbackDispatcher interface for the CallbackThread. This lets you inject code between the CallbackThread and the actual dispatch of the callback: ipcon.setCallbackDispatcher(new IPConnection.CallbackDispatcher() { public void callbackReceived(IPConnection.Callback callback) { callback.dispatch(); } }); The callbacks are still dispatched by the CallbackThread by default as before. But if you set a CallbackDispatcher then the CallbackThread will pass callback objects to it and it has to call their dispatch method to dispatch them. Here you can pass them to your Swing event queue and make the event loop call the dispatch function. Be aware that you need to ensure that all callbacks delivered to the dispatcher are dispatched at some point, otherwise you can block a disconnect call. Attached is a first prototype for this. tinkerforge_java_bindings_2_1_2_b3f88827594183802a72f623c4dfcdeb7e3c33f7+1.zip
  3. We could probably do something similar to the manual callback dispatch in PHP: IPConnection::dispatchCallbacks() This could be done by adding the following methods to the IPConnection class: void setAutomaticCallbackDispatch(boolean enabled); boolean getAutomaticCallbackDispatch(); void dispatchCallbacks(int duration);
  4. Wenn du Interesse daran hast Go Bindings zu erstellen, die wir dann nachher auch weiterverwenden können, dann solltest du dich an der Struktur aller bestehenden Bindings orientieren. Wenn die Struktur der API und die Struktur der Implementierung aller Bindings gleich (oder zumindest sehr ähnlich ist) dann sind sie einfacher zu verstehen und zu pflegen. Wenn du Fragen zu den Interna der Bindings und der Generatoren hast, dann immer nur aus damit
  5. Wir planen dazu folgende Erweiterungen: Kamerasteuerung (auslösen/fokussieren) ist mittel Industrial Quad Relay vorgesehen. Unsere Kamera hier hat für den kabelgebundenen Auslöser einen 2,5mm Standard Stereoklinken-Anschluss bei dem man einfach nur 2 Kontakte kurzschließen muss zum auslösen/fokussieren. Was wird dann auch die dazugehörige Software können. Zum Beispiel X Schritte fahren, auslösen, Y Sekunden warten und dann wieder X Schritte fahren usw. Endschalter für automatische Kalibrierung der möglichen Fahrstrecke. Ohne Endschalter muss beim Start einmal manuell die möglichen Fahrstrecke kalibriert werden.
  6. Definitiv nur auf einer Seite die Abschirmung auf Masse legen, nicht auf beiden Seite. Vorzugsweise an der Bricklet Seite die Abschirmung auf Masse legen.
  7. Okay, dann scheint da wohl der I2C Port Expander auf dem Bricklet ein Problem zu haben. Melde dich mal mit deiner Bestellnummer bei info@tinkerforge.com
  8. Du könntest ein altes geschirmtes Ethernet oder USB Kabel dafür opfern und damit dein bisheriges Kabel ersetzen.
  9. Die 3V Angabe im Shop ist leider falsch, sorry. Wir verkaufen die Variante mit Status LED, für die die Mindest-Eingangsspannung bei 4V liegt. Ich habe die Angabe im Shop korrigiert. Daher solltest du die IO-16 im 5V Modus verwenden, um auf der sicheren Seite zu sein.
  10. ceraner, was ist das andere funktionierende Bricklet, das du hast? Funktionieren am LCD Bricklet die Knöpfe, oder tun's die auch nicht?
  11. Die Tags die wir verkaufen sind alle vom Typ "NFC Forum Type 2". Bei diesem Typ sind Page 0-1 nur lesbar und in Page 3-4 stehen Lockbits die man nicht einfach so überschreiben sollte: http://www.tinkerforge.com/de/doc/Hardware/Bricklets/NFC_RFID.html#page-groszen-und-andere-dinge-die-man-wissen-sollte Da könnte brickv schlauer sein und die Start Page auf 5 setzen. Wenn du versucht Page 0-3 zu schreiben solltest du als Fehler "Could not write page 0" in Textfeld stehen. Das ist leider in grau geschrieben und daher nicht unbedingt sofort erkenntlich. Wenn du das mit Page 5-8 testest wird es gehen. Wenn du auf den Tag Text schreiben willst dann muss du dir überlegen in welchem Encoding. Die Tags speichern einfach nur Bytes, was diese Bytes bedeuten ist deine Sache. Der String "tag=color|content=red" (ohne Anführungszeichen) in ASCII encodet und hexadezimal dargestellt: 0x74 0x61 0x67 0x3d 0x63 0x6f 0x6c 0x6f 0x72 0x7c 0x63 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x3d 0x72 0x65 0x64 Diese Byte Folge kannst du auf den Tag schreiben.
  12. Ah, sorry, mein Fehler. Da waren noch zwei Bugs drin. Ich denke du hast schon alles richtig gemacht Hier noch eine Version zum testen, mit der sollte es jetzt endlich klappen. tinkerforge_delphi_bindings_2_1_2_eef9bdd8d1fcf525095bf3dfa2de32d8c14db322.zip
  13. Hast den den Host auch entsprechend angegeben? Standardmäßig wird in den Beispielen immer localhost (127.0.0.1) verwendet. Die Beispiele verbinden sich also immer zu brickd auf dem lokalen Rechner und haben damit Zugriff auf die lokal per USB angeschlossenen Bricks. Wenn du das Beispiel also mit localhost auf Windows ausführst und der Master Brick auch an diesem Rechner angeschlossen ist dann klappt die Kommunikation. Wenn du das Beispiel aber mit localhost auf Mac OS X ausführst, dann muss der Master Brick auch am Mac angeschlossen sein und dort brickd laufen. Oder du muss im Beispiel die Host Einstellung auf die IP Adresse des Windows PCs ändern, um die dort angeschlossenen Bricks zu erreichen.
  14. Hast du in Zeile 21 des ExampleStackStatus Beispiels die UID deines Master Bricks eingetragen: UID = 'ap8MjSchCcU'; { Change to your UID }
  15. Nic, danke für den Test. In der angehängten Version wird jetzt wieder der vorherige Code für Windows verwendet und der neue Code nur noch für nicht-Windows. whes, das 'Deklaration suchen' klappt hier bein manchen Funktionen, bei machen passiert nichts und manchmal kommt eine Fehlermeldung über fehlende Dateien. Etwas komisch, aber auch nicht so wichtig. Liegt wahrscheinlich an meiner Installation hier. tinkerforge_delphi_bindings_2_1_2_7d2e81f35aa7502fa2e6ed6fd47651cc373674ac.zip
  16. remotecontrol, du verstehst das richtig.
  17. Hier die nächste Version zum testen. Diese verwendet jetzt getaddrinfo statt gethostbyname. tinkerforge_delphi_bindings_2_1_2_3e2a3debec6336db653a4f367e9a0b7bea21e433.zip
  18. Hier unter Delphi XE6 kommt gethostbyname aus Posix.NetDB für OSX32. Mal sehen was ich da alternativ für XE3 nehmen kann, wenn gethostbyname da wirklich fehlt. Woher weißt du welche Funktionen in welchen Units sind? Aus der Dokumentation, oder gibts da eine Möglichkeit, dass die IDE mir für jede Unit, die eingebunden wird, das anzeigen kann? Für die Posix Module kann ich nur raten/annehmen welche Funktionen diese anbieten.
  19. Das muss einfach 6V lauten. Ist jetzt korrigiert. Danke für den Hinweis.
  20. Okay, hier eine erste Version zum testen. tinkerforge_delphi_bindings_2_1_2_40737439d7c1882d1395ec4a006bdceccd660fe4.zip
  21. Richtig, die bis zu 27V, die du an der Step-Down Power Supply einspeist, werden über den Stack übertragen. Der Stepper Brick nutzt diese dann für die Versorgung des Schrittmotors, wenn an seinem eigenen schwarzen Stecker keine Spannung anliegt.
  22. Eigentlich sollte sich brickv auf 1024x768 noch normal bedienen lassen. Zumindest war das mal das Ziel, möglicherweise müssen wir das mal nachkontrollieren, ob das noch alles hinkommt. Die Knöpf auf dem Setup Tab nach oben zu verlegen ist dann ja keine allgemeine Abhilfe. Wenn das brickv Fenster zu hoch ist, dann kommst du ja auch auf anderen Tabs nicht unbedingt an alle Bedienelemente. Als Workaround kannst du einfach den Update Dialog schon aufrufen bevor du die Verbindung zum Stack herstellst. Dann sollte das Fenster noch klein genug sein, oder?
  23. Die API des NFC Chips auf dem Bricket ist so, dass man bei der Anfrage ob ein Tag in der Nähe ist angeben muss mit welchem Protokoll der NFC Chip nach Tags suchen soll. Die verschiedene Tags haben verschiedene Protokolle. Dein Smartphone geht einfach alle Protokolle zyklisch durch. Genau das kannst du auch mit dem Bricklet tun. Dies wird z.B. in den Beispielen des NFC/RFID Bricklet demonstriert. Du hast recht, tag_type ist nicht ausreichend dokumentiert. Das werde ich verbessern. Fürs erste: Mifare Classic = 0 NFC Forum Type 1 = 1 NFC Forum Type 2 = 2
  24. I released 2.0.2 today, see the announcements thread. You pointed out a missing feature that was easy to add, so I added it. Changing the changelog format is not that easy, so that won't happen today
  25. Piezo Speaker Bricklet Plugin 2.0.2 now treats beep() with a duration of 0 as "stop current beep" and beep() with a duration of 4294967295 (UINT32_MAX) as "beep forever".

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.