This is an old revision of the document!
This project revolves around a box that can be opened remotely over a Wi-Fi connection. The box hosts a server locally and waits for the client to press a button on the webpage in order to transition from the CLOSED to the OPEN state, or OPEN to CLOSED if it has transitioned previously. Everything will be hosted on the same network, a mobile hotspot for the sake of the project.
Initially, the box is in the CLOSED state, where the motor isn't being acted upon, it's display has the “CLOSED” text, IP address and the box is considered closed. After the user presses the button on the page, the box plays a sound, the motor activates to lift up the cover of the box and the displayed message changes to “OPENED”. A second message will revert to the initial state.
The current implementation includes all the functionalities:
Libraries used are:
It is a very straight forward project, making use of multiple libraries and concepts (WiFi communication, HTML design, PWM, I2C, GPIO, UART). For end users, it's very simple to use, as the IP is clearly displayed, and could be even easier to connect to using a DNS. There's no need for them to do anything other than charge the battery every now and then as long as the network stays the same.
The servo was calibrated according to this [linku rnt sg90] and does a 90 degree turn. The display was calibrated using [linku rnt display]. There is also a delay in place for the client reply to lower the HTML responses sent and also save power.
I implemented one function at a time, first to make a sound, then to move the servo and then to draw on the display. I observed them working normally, whereas for the server I first used the serial to make sure it's connecting to the WiFi and later my laptop to connect to the server.
Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul în care se încarcă fişierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin.
https://randomnerdtutorials.com/esp32-servo-motor-web-server-arduino-ide/