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.

Featured Replies

Geschrieben

Hi,

I don't see any examples how to extend callback listeners or create new ones. Just an example with no meaning in Java from the documentation.

device.addExampleListener(new BrickletServoV2.ExampleListener() {
    public void property(int value) {
        System.out.println("Value: " + value);
    }
});

For the servo there a 2 OOTB examples, but I want to create my own for getCurrentPosition or current used on the servo as example. How do I implement this properly ?

Regards,
Rik

Geschrieben

Unfortunately the Servo Bricklet only has callbacks for positionReached. You can find a complete example for it here: https://www.tinkerforge.com/en/doc/Software/Bricklets/ServoV2_Bricklet_Java.html#callback

 

If you want a Listener for getCurrentPosition you will have to call getCurrentPosition and implement a Listener-mechanism for that yourself.

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.