Basic Rotary Encoder Code Example

Place code snippets and demo code here
Post Reply
Zim
Posts: 88
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 61 times
Been thanked: 44 times

Basic Rotary Encoder Code Example

Post by Zim »

2021-03-20 21_45_12-Window.jpg
Thanks to cicciocb
You do not have the required permissions to view the files attached to this post.
its1000
Posts: 54
Joined: Thu May 20, 2021 6:57 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Basic Rotary Encoder Code Example

Post by its1000 »

hello all,

in this example I don't understant the 1st line.
what is it for?

thanks for your help ..
User avatar
PeterN
Posts: 97
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 41 times
Been thanked: 45 times
Contact:

Re: Basic Rotary Encoder Code Example

Post by PeterN »

Like Zim, I do reuse "old" program scripts for the next new project and then ad or delete code lines . And we seem to use similar ESP8266 boards.
The first line is just a multi statement line that defines some variables to translates the pin labels that you find printed at some boards (e.g. WEMOS D1) to the "normal" ESP8266 GPIO pin numbers.
He could have used this variables then in the next lines - but just did not do it this time.

So in this context you can ignore the line - or could use the variables in the code which makes the code a bit more easy to read and understand.
its1000
Posts: 54
Joined: Thu May 20, 2021 6:57 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Basic Rotary Encoder Code Example

Post by its1000 »

thank you
Post Reply