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

Kann man eigentlich die drei Knöpfe vom lcd20x4 display programieren???

 

 

Fjahn

Geschrieben

Du kannst Software programmieren die über die Knöpfe gesteuert wird... also indirektes ja

Geschrieben

Das trifft sich gut, da hätt ich auch gleich einen Frage :D

 

Und zwar kann ich ja mit Python über is_button_pressed oder so abfragen ob ein knopf gedrückt wurde.

Mein Problem ist aber das ich den Knopf drücke dann Enter drücken muss und mir dann erst gesagt wird welcher Knopf gedrückt wurde.

Also um Beispielsweiße das Display auszuschalten muss ich den Knopf drücken Enter drücken und dann könnt ich erst weiter im Programm sagen dass er das Licht ausmachen soll.

Wie kann ich das denn anders lösen? Über Schleifen und dann gibt es ja noch pressed und released oder so?

 

MfG

 

kuchenmann

Geschrieben

Es gibt sogenannte Callback-Funktionen.

 

Du entwicklest eine Funktion in der Du den Fall des Button-Drückens abhandelst und sagst einer weiteren Funktion , dass deine Funktion aufgerufen werden soll, wenn ein Button gedrückt wird.

 

In Python sähe das dann so aus:

 

 

def my_callback(param):

    print('Button pressed:" +param)

 

lcd_20x4.register_callback(LCD20x4.CALLBACK_BUTTON_PRESSED, my_callback)

 

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.