This video shows an ESP8266 controlling a motor (speed and on/off state) with an ULN2803A Integrated Circuit as buffer to avoid damaging the IO pins of the ESP.
Since the ESP8266 can connect to a Wireless Network and send/receive data over the internet, this allows for remotely controlling a DC motor and create some interesting automation projects.
You can check the full code and electric diagram in my blog:
https://techtutorialsx.wordpress.com/...