Hypnos Active Member Licensed User Longtime User Feb 19, 2017 #1 Dear All, I would like to make use of the Rotary Encoder on my next project on Android Things running on pi3, am I need a library or anyone can give me some example code on B4A please? http://guy.carpenter.id.au/gaugette/2013/01/14/rotary-encoder-library-for-the-raspberry-pi/
Dear All, I would like to make use of the Rotary Encoder on my next project on Android Things running on pi3, am I need a library or anyone can give me some example code on B4A please? http://guy.carpenter.id.au/gaugette/2013/01/14/rotary-encoder-library-for-the-raspberry-pi/
Hypnos Active Member Licensed User Longtime User Feb 19, 2017 #2 Hypnos said: Dear All, I would like to make use of the Rotary Encoder on my next project on Android Things running on pi3, am I need a library or anyone can give me some example code on B4A please? http://guy.carpenter.id.au/gaugette/2013/01/14/rotary-encoder-library-for-the-raspberry-pi/ Click to expand... Currently, I'm using a timer with the following code, but I can't rotate it too fast, any better way ? Code: Copy Sub Timer_Tick Dim aState As Boolean aState = PIN17.Value If aState <> aLastState Then If PIN18.Value <> aLastState Then R_Value = R_Value +1 Else R_Value = R_Value - 1 End If End If aLastState =aState End Sub Upvote 0
Hypnos said: Dear All, I would like to make use of the Rotary Encoder on my next project on Android Things running on pi3, am I need a library or anyone can give me some example code on B4A please? http://guy.carpenter.id.au/gaugette/2013/01/14/rotary-encoder-library-for-the-raspberry-pi/ Click to expand... Currently, I'm using a timer with the following code, but I can't rotate it too fast, any better way ? Code: Copy Sub Timer_Tick Dim aState As Boolean aState = PIN17.Value If aState <> aLastState Then If PIN18.Value <> aLastState Then R_Value = R_Value +1 Else R_Value = R_Value - 1 End If End If aLastState =aState End Sub