Let’s be honest, the last part was only a warm up – now it’s time for some fun. Integrate an Arduino, a servo motor, an ENC28 ethernet interface and some more electronics into the Nerfgun, don’t forget to attach a WiFi nano router and make in controllable by a smartphone app.
If we want to integrate the Arduino inside the gun we need at least an Arduino ProMini, otherwise there is not enough space and it needs to be mounted outside of the Nerfgun. The wiring and code for this project will be compatible with most of the Arduino boards like the Nano, Uno or Mega.
Another interesting option would be to use an ESP8266, another Microcontroller that already has WiFi onboard and can be programmed with the Arduino IDE.
To establish the Ethernet connection, I chose an ENC28 module. It’s a little bit trickier and more resource intensive than the usual Arduino W5100 module, but it’s cheaper and if we get it working, it works just as well.