Unit B · What your device can sense
What we are making: two links on a web page that physically move a servo. The first time your page does something instead of just saying something.
Until now your board has answered one address: /, the front page. Today it
answers three. /open and /shut are addresses too, and when the
browser asks for one, the board moves the servo before it replies.
That is the whole mechanism behind every button on every web page you have ever pressed. There is nothing else to it.
write(180) to a smaller angle and find your servo's real limit.| What you see | Why | What to do |
|---|---|---|
| The board restarts when the servo moves | Servo powered from 3.3V. | Move the red wire to VIN. This is nearly always it. |
| Servo does nothing, page works | Wrong library or wrong pin. | ESP32Servo, and check the orange wire is on GPIO 13. |
| Page shows ‘Not found’ | A server.on line is missing. | Every address needs its own line in setup(). |
| It moves once and never again | The browser cached the page. | Press refresh properly, or use the back link rather than the back button. |
In this session