Page 1 of 1

Query old / new z-uno

Posted: 04 Oct 2021 19:22
by joergm6
How can I handle both z-uno generations in the code?
e.g. The button on the z-uno has different ports.

ifnewzuno
#define BTN_PIN 23
else
#define BTN_PIN 18
end

Re: Query old / new z-uno

Posted: 05 Oct 2021 18:10
by joergm6
Will this work?????

#if ZUNO_PIN_V == 6
#define BTN_PIN 23 // z-uno2G
#else
#define BTN_PIN 18 // z-uno
#endif

Re: Query old / new z-uno

Posted: 06 Oct 2021 09:59
by p0lyg0n1
Hi,
You are wrong, on the first ZUno button is located on #23 pin too, but it uses #18 to wakeup. So you can use pin 23 to handle both versions.

Best regards,

Alex.

Re: Query old / new z-uno

Posted: 06 Oct 2021 12:36
by joergm6
Thank you, I did not know that. In all (old) examples port 18 is used. :)