Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switches connected to ESP32 #26

Closed
une18 opened this issue Mar 22, 2021 · 4 comments
Closed

Switches connected to ESP32 #26

une18 opened this issue Mar 22, 2021 · 4 comments

Comments

@une18
Copy link

une18 commented Mar 22, 2021

How to connect button or switch to ESP32 for start, stop, left, right commands?

Is it possible to create a simple row of commands 1000 steps left, delay 2000ms, 2000 steps right, delay 1000ms....

I have a HW-040 rotary encoder, for some reason It did not work with the motor. Is it faulty, or....

@pkerspe
Copy link
Owner

pkerspe commented Mar 22, 2021

Hi Une18, this is a software library reposiotory, not a hardware connectivity support forum :-)

To connect buttons to the ESP you need one GPIO Pin per button (unless you want to create matrix setup, which is probably not a good way to begin with).
You connect one Pin of the Button/Switch to GND and the other PIn to the GPIO of the ESP. Then you configure the Pins as inputs with internal pullups enabled.

Yes, you can create "rows of commands" in a custom function you write in C++. You can use the blocking functions for moving the stepper, then using delay and moving again. All functions of the library are documented here: https://github.com/pkerspe/ESP-StepperMotor-Server#library-api-documentation

AS for the rotary encoder: with the little details provided there is nothing I can do to help, but maybe you should check in a hardware forum how to connect a rotary encoder.

@pkerspe pkerspe closed this as completed Mar 22, 2021
@une18
Copy link
Author

une18 commented Mar 23, 2021

I know how to wire the buttons, I did not find a way how to tell the software what one or the other button conneted to any GPIO pins should do.

I asked, for the switches, because I could not find information about it in the documentation. Still can not...

I wanted to know if it is possible to do all this in UI, I can not write code myself.

Will order another encoder. Would you reccommend a specific model?

@pkerspe
Copy link
Owner

pkerspe commented Mar 23, 2021

Other than limit switch functionality and rotary encoders, additional switches and functionality are currently not supported to be created via the UI.
The features you require need custom c++ code to be written.
You are looking for the Marco-Functionality which is planned for some future release but not implemented yet. This feature will still take some time. See #19

@une18
Copy link
Author

une18 commented Mar 23, 2021

Thank You!

I have the will, but not the skill :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants