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

Hallo zusammen,

ich habe mal eine Frage zu dem IO4-Bricklet und der PWM-Funktion.

Es gibt den Befehl: io_4Bricklet.set_pwm_configuration(3, 3000, 1000)                    

Dabei ist der erste Wert der Kanal, dann die Frequenz und dann der Duty_Cycle

Kanal ist klar.

Aber welchen Wert muss ich verändern, damit ich eine "normale" PWM-Funktion habe. Muss ich die Frequenz und auch den Duty-Cycle immer gleichzeitig verändern?

 

Z. B. wenn ich eine LED auf- und abdimmen will.

Kommt bei dem maximalem PWM-Wert dann 3,3V heraus?

Geschrieben
  • Autor

Okay, danke schon mal dafür.

In der Doku steht "Standardwert bei Frequenz ist 0"

Also wäre: io_4Bricklet.set_pwm_configuration(3, 0, 1000) die maximale PWM-Leistung?

Geschrieben

Wie die Dokumentation schon sagt schaltet eine Frequenz von 0 die PWM Funktion aus.

Du solltest dir eine Frequenz (> 0) auswählen und diese dann fix beibehalten. Welche Frequenz du wählen solltest hängt von deiner Anwendung ab.

Wenn du die Frequenz zu niedrig wählst dann kannst du bei niedrigen Duty Cycle die LED flackern sehen.

Geschrieben
  • Autor

Hallo photron,

läuft jetzt super.

Komischerweise bringt es zumindest in meiner jetzigen Konstellation nichts, ob ich die Frequenz auf 1000 oder z.B. 40000 setze.

Aber egal, die PWM-Funktion läuft wie sie soll!

Danke.

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.