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

Program additional functions #38

Open
xpix opened this issue Feb 3, 2023 · 4 comments
Open

Program additional functions #38

xpix opened this issue Feb 3, 2023 · 4 comments

Comments

@xpix
Copy link

xpix commented Feb 3, 2023

Hello Paul,

I would like to program an additional function (solar tracker), how would you go about it. So I guess I need a separate module, but at which point should I put it in? Besides of course extend the UI, but that I should deal with the UI.

If you would make me there a short suggestion, I would be very grateful :)

Greetings
Frank

@pkerspe
Copy link
Owner

pkerspe commented Feb 3, 2023

Hi Frank,
a solar tracker seems to be a rather specific function and I am not sure if it should be a flow blown feature in the stepper motor server.
I'd rather call it "automatic position adjustment" or "position tracking logic".
So we could add support for an analog value that can be linked to a Stepper Axis and basically moves the stepper as long as the analog value is above of below a certain threshold.

How would you implement the solar tracker? Simple LDR (Photoresistiors) Setup or something more sophisticated?
As for the UI what kind of functions would you like to add to the UI?

@xpix
Copy link
Author

xpix commented Feb 5, 2023 via email

@pkerspe
Copy link
Owner

pkerspe commented Feb 6, 2023

Hi Frank,

When you talk a lot reading gps via serial, are you referring a gps receiver connected via serial interface or do you mean you wanted to input some coordinates via the serial interface?

To create a new view in the webinterface (in esp-steppermotor-server-ui repository https://github.com/pkerspe/ESP-StepperMotor-Server-UI/tree/master/src/views) you can just add a new vue.js view with the needed form elements, then rebuild the vue application and upload to the esp32.
In order to communicate with the esp32 stepper server you need to add some rest endpoints to handle the requests from the frontend in the function:

ESPStepperMotorServer_RestAPI::registerRestEndpoints()
(In ESP-StepperMotor-Server repository)

@xpix
Copy link
Author

xpix commented Feb 7, 2023

Hi Paul,

Well, I have tried to read out the data seriel via a GPS sensor. But since my solar tracker is mostly stationary, it is also sufficient to simply enter the data manually in the UI and save it. Since we have a client/server system, it is quite easy to extend the UI and control the ESP via REST interface.

Thank you very much for your help.

Greetings
Frank

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