Be sure to see the "entagled" page here for more supporting information of the twin unit: https://github.com/topherCantrell/FarmerSays
The first order of business was removing some of the mechanical hardware in the toy and installing a motor to spin the dial electrically.
Then I removed the control board and drilled small holes in order to bring sense/control wires out the back.
Here I'm showing how I mounted the Adafruit Feather HUZZAH with ESP8266 board at the edge of the case so I could plug in the USB mini connector for programming/charging. This is the board I purchased:
https://www.adafruit.com/product/2821
The wires I soldered onto the board are shown here connected to a socket which holds an MCP23017. You can get one here:
https://www.adafruit.com/product/732
Just another picture showing how I needed to bend the pins on the chip a little, as space was tight.
I followed the Adafruit guide on wiring the port expander to the Huzzah. The guide is found here: https://learn.adafruit.com/using-mcp23008-mcp23017-with-circuitpython?view=all
The toy's mechanical construction is really quite inspiring to see. I'm sure the designers had a blast coming up with this solution. Since I'd pulled out much of the original hardware, I had to do a little creative reconstruction using string, super glue, and hot glue to mimic the original behavior. The raised portion of the yellow gear needs to press one of the 12 buttons on the PCB when the string is pulled.
Here I show the original return string re-purposed to pull the red arm back when the string is released.
And finally... It's hard to see here, but I installed a mosfet to control power to the motor and an 18650 battery which could power the toy for about a day of light use.
