Iv'e created 3 REST endpoints for the desk and uploaded them to the ESP :
http://[DESK IP]/up - increase height - will signal the UP button for 200ms (click simulation)
http://[DESK IP]/dn - decrease height - will signal the DOWN button for 200ms (click simulation)
http://[DESK IP]/st - state read - will read the serial input from the relay unit and display the results
To save space and ease development, iv'e decided to host the web interface on S3 and call the API by embedding a <script> tag on the page. The script will call the ESP which in turn returns a JS command - "results(key,val);".
An example of the interface is up here :
http://deskcontrol.s3.amazonaws.com/index.html#[IP OF DESK]
Currently working on setting up a git repo for this project. will update as soon as it`s up
as for the schematics - the components I needed were : 3.3v regulator, 5v to 3.3v level shifter, the ESP and a TTL header (for programming / updates)
I finished drawing the initial design and looks like it`s working. (attached)
next step - PCB fab + 3D print enclosure and we're good to go
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.