vendredi 3 juin 2016

Button Example

[​IMG]

Code:
  Sub Process_Globals
Public Serial1 As Serial
Private btn As Pin
Private led As Pin
End Sub

Private Sub AppStart
Serial1.Initialize(
115200)
Log("AppStart")
led.Initialize(13, led.MODE_OUTPUT)
btn.Initialize(btn.A0, btn.MODE_INPUT_PULLUP)
'Using the internal pull up resistor to prevent the pin from floating.
btn.AddListener("Btn_StateChanged")
End Sub

Sub Btn_StateChanged (State As...
Button Example

from B4X Community - Android, iOS, desktop, server and IoT programming tools http://ift.tt/1YBx8L7
via IFTTT

Aucun commentaire:

Enregistrer un commentaire