Circuit cleaning time!
Once you are satisfied with how prototype performs it's time to remove all the wires from the ESP8266.
With a clean ESP8266;
- Connect VCC to CH_PD.
- Then connect GPIO15 to GND.
- GPIO12 goes to the middle pin (B) on the transistor.
- VCC connects to C on the transistor.
- E on the transistor goes to positive on the motor.
- Ground on the motor goes to ground on the ESP8266.
- Positive battery lead to VCC or CH_PD.
- Negative battery lead to GND.
Battery cables, transistor and motor all attached in a compact package.
To prevent any exposed connections from touching the medallion wrapping everything is heatshrink is a good idea.
And with that it's all done.
Mounting the motor and wireless module inside a medallion can be done with hot glue or an epoxy resin. I opted for hot glue so I can remove it and make improvements such as CR2032 battery instead of LiPo or glowing LEDs for eyes.