Page 1 of 1

Basic Rotary Encoder Code Example

Posted: Sun Mar 21, 2021 3:48 am
by Zim
2021-03-20 21_45_12-Window.jpg
Thanks to cicciocb

Re: Basic Rotary Encoder Code Example

Posted: Sat Jul 10, 2021 11:09 pm
by its1000
hello all,

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

thanks for your help ..

Re: Basic Rotary Encoder Code Example

Posted: Sun Jul 11, 2021 5:16 am
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.

Re: Basic Rotary Encoder Code Example

Posted: Mon Jul 12, 2021 7:06 am
by its1000
thank you