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

Wie bekomme ich den PWM-Ausgang des Servobricks (alos welches Pin: oben, unten, mitte) an diese KSQ: http://www.led-tech.de/de/LED-Controlling/Konstantstromquellen/BUCK-Konstantstromquelle--350mA,-30V--LT-1550_118_119.html?

 

Die LED soll dann gedimmt werden.

Leuchten ohne PWM funktioniert. Aber egal wie ich den "Output" vom ServoBrick an die KSQ anschließe - es wird nicht gedimmt...

 

Wenn ich eine LED mit Vorwiderstand zw. den oberen Pin und den unteren Pin klemme, kann ich diese perfekt dimmen.

 

    servo.set_output_voltage(5000)
    servo.set_degree(0, 0, 255)
    servo.set_pulse_width(0, 0, 2000)
    servo.set_period(0, 2000)
    servo.set_acceleration(0, 0xFFFF) # Full speed
    servo.set_velocity(0, 0xFFFF) # Full speed

    while 1==1:
        for x in range(101):
            #Sinus
            wert=128+round(128*math.sin(x/100*math.pi*2))

    servo.disable(2)
    ipcon.disconnect()

Geschrieben

Hallo Jan,

 

wo setzt du den berechneten Wert denn? Ich vermisste ein setPosition in deinem Code.

 

Du solltest GND und den PWM Pin vom Servo Brick anschließen. Die Ausgangsspannung ist unnötig hierbei einzustellen, da das PWM Signal des Servo Bricks immer fest mit 5V betrieben wird (oder was auch immer über USB ankommt).

 

Grüße

Geschrieben
  • Autor

ja, da ist auch ein

servo.set_position(0, wert)
time.sleep(0.05)

hab ich vergessen zu kopieren.

 

Wie gesagt, wenn ich eine normale LED zw. GND und PWM (+Widerstand) klemme, dann wird diese gedimmt. Aber wenn ich die selben Anschlüsse an die KSQ lege wird nichts gedimmt. Vielleicht frag ich auch noch mal dort im Forum nach, wollte aber erst eimal sicher sein die richtigen Pins zu verwenden.

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.