Header-53.jpg

INSIGHTS

Nerf IoT Build Challenge Phase: 2

 

Phase 2: Software controlled triggering of the Nerf gun turret and an Android application with a firing button that calls into node.js code via socket.io, triggering the gun and broadcasting to all connected clients. 

The team collaborates and gets a jump start on Phase 2 of the project! If you missed out on Phase one catch up here.

Group_Pic.jpg

Team uses a Bread Board to prototype how Edison would control the LED's.

Bread_Board

The goal was to light up one LED (GPIO 5), and then light up a second LED (GPIO6). The purpose of this test was to be able to send 2 different signals to the turret before actually wiring it up.

Blinking_LED_Gif

Meanwhile, the electronic triggers were soldered such that they could accept these inputs. All the safety switches that detected open breech doors were removed by attaching those switch wires together. 

 Soddering

 

And then the Nerf turret was reconstructed.

 Nerf_and_Computer

Edison was connected to the MAC computer via USB (for power only), code was sent to it over NVISIA’s wifi network.  Edison was connected to the Bread Board via wires coming from GPIO.  Messages were sent to the Edison via commands entered into the Command Prompt Window.  Parameters included (On/Off), with GPIO digital pins, as well as the modulated wave frequency to be sent to the breadboard.  If volts went over the maximum allowed by Edison, then it would send the max that Edison will allow resulting in a fully lit LED.

A relay was added to the circuit to control the voltage sent to the trigger. This required switching to GPIO4 instead of 5 and 6. Next, node.js code was written using the cylon code library to periodically turn on and off the lights (resulting in a blinking). Finally, the LEDs output was replaced by the actual turret triggering switch and the code was invoked to trigger the turret for a time interval and then turn it off for the next interval, essentially blinking the gun.

 

Mobile Application Development

Next steps included working on a mobile app to integrate with it.

Goal was to have an Android application with a fire button call into node.js code via socket.io, triggers the gun and broadcast to all connected clients that it was triggered. Below is the first demo of the Andriod application in action.

 

 
 

 

Stay tuned for Phase 3: Incorporating a Roomba into the mix

Roomba.jpg

Topics: Software Development, News

Leave a Comment