MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
15.97k stars 19.09k forks source link

[FR] Single pin for LCD BTN EN1, EN2, and ENC #27078

Open Reza-v opened 3 weeks ago

Reza-v commented 3 weeks ago

Is your feature request related to a problem? Please describe.

So i am designing a control board based on the stm32 blackpill and because of a limited number of pins, i've had an idea. I'm trying to combine the three control wheel pins, BTN_EN1, EN2, and ENC and connect them to a single analog pin through resistors with different resistances and have the controller sense the resistances and activate the buttons accordingly. Now i am not very adept in programming MCUs so any help is appreciated. Should i just write the conditions in the pins file and that would work? I haven't tried anything yet.

Are you looking for hardware support?

No response

Describe the feature you want

Doodooo deedee daa

Additional context

No response

ellensp commented 3 weeks ago

I dont think this can be done.

the encoder uses quadrature encoding

Ie there are times when both BTN_EN1 and BTN_EN2 are 0 or 1 at the same time

Reza-v commented 3 weeks ago

It's definitely possible through software it just might take up some flash space And while there are times when both pins are high/low, that equates to another resistance value that can be picked up