Software - first contact and all the files

A project log for A functional Stargate

It won't transport me, but it will transport something across vast distances

shlonkinshlonkin 04/27/2014 at 14:261 Comment

Thanks to team member dkopta the stargate has now established a connection across the vastness of space... er, I mean the internet, to a computer on the other side of the world. On the other end was an awesome stargate simulator, or rather a dialing computer simulator, made by dkopta. We also need to thank a new team member, Brando the audio technician, who extracted the audio from some SG-1 videos to acquire some high quality gate sounds. We really wanted to have a second gate on the other end, but there was no way it could be completed in time for the contest. At this point the only data transmitted has been the dialed address itself so that the receiving end can simultaneously move and play sounds. Dialing and receiving can go both ways, so I can feel the fear of an incoming wormhole with no iris on the gate. Fortunately no goa'uld have come through the gate yet.

Anyway, on to the details. There are actually several bits of software in use. 

First, the arduino code, which can be found here:

The ATMega328 listens for input from a serial connection as well as an IR receiver. If there is IR input, it enters dialing mode in which it receives an address from the remote dialer(described in a previous log) and sends the corresponding data to the computer. That data includes the indices of the glyphs being dialed and the number of glyphs that must be rotated to get there, which is used to determine timing for the sounds. Those numbers are both sent to the receiving computer so that sounds and such can occur simultaneously on both ends.

If there is serial input, the gate enters receiving mode in which it receives glyph indices and sends the timing info described above. In both modes the mcu controls the stepper motor rotating the ring as well as the chevron LEDs.

Second, the Processing code on the gate end, which can be found here:

There are separate programs for dialing and receiving, though it would not be too difficult to combine them into one. These programs are responsible for connecting the mcu to the internet and playing sounds. They get sound timing info from the gate(serial) and piece together rotation startup, rotation, and chevron engaging sound files that can be found here:

Third, the dialing computer simulator, which can be found here:

Since there was not enough time to make a gate for the other end of the connection, dkopta put together this nice animated simulator. Rather than a lengthy, unclear description of it just go watch the video of it in action, which is included in the final result log. It works for both dialing, by clicking the symbols, and for receiving.

Fourth, the server code, which can be found here:

This was set up on another computer for convenience and testing. It basically manages the connection and relays data.


dapsalpurido wrote 01/16/2016 at 12:13 point

cual es el primero a utilizar de los codigos para el arduino  para la recepcion pues salen dos

  Are you sure? yes | no