Go Down

Topic: V Visitor Laser Gun Replica Prop with Light and Sound (Read 6 times) previous topic - next topic

the-rebel-agent

Ok, have good news about this project. After working a lot with the sound module, which was defective, got a new one and did work. Wrote a library to manage it, and after that, wrote a program to control a laser gun. This is the source code:

Code: [Select]
/*
Sketch to control a V Visitor laser gun prop.
Created by Diego J. Arevalo, August 10th, 2012.
Released into the public domain.
*/

#include <Wtv020sd16p.h>
#include "LaserGunFactory.h"

int resetPin = 2;
int clockPin = 3;
int dataPin = 4;
int busyPin = 5;
int analogLedPin = 6;
int triggerPin = 7;
LaserGunType laserGunType = VVisitorLaserGun;

LaserGunFactory laserGunFactory;
LaserGun *laserGun = NULL;

void setup() {
  laserGun = laserGunFactory.getLaserGun(laserGunType, triggerPin, resetPin, clockPin, dataPin, busyPin, analogLedPin);
}

void loop() {
  laserGun->senseTrigger();
}


Yeah, I am not an Arduino expert, but I am a software developer. So I designed the laser gun in different modules. Each one controls a specific function. I attached the entire source code. You will need a WTV020SD16P audio module and Its library to use this code. Here is the library:
http://arduino.cc/forum/index.php/topic,117009.0.html

Here is the video of the test:

http://www.youtube.com/watch?v=AYNur8XLJqQ

I really enjoyed dong this and I am going to use Arduino in every possible electronic project at my hand. Any question don't hesitate in contact me. Next step is to print the laser gun and fit in everything inside. Keep you posted guys.

the-rebel-agent

Migrated to Arduino Mini Pro Artic Edition:





Will be optimizing the circuit as well the software.

Jantje

Nice work :-)
I enjoyed reading this.
best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

onesky

good work!
we should start also a project for a voice changer as the visitors robo-voice..

DuaneB

Hi,

If you guys PM me your email addresses I will send you the illutron B synth code, then I am pretty confident you could make these effects with out using external components - its has four independent channels for sound or music, with control over attack, waveform, decay, duration, pitch etc.

You might have seen this link I posted yesterday using the library for a pocket night club, obviously in that application I am aiming for musical sound rather than sci fi, but it will do both.

http://rcarduino.blogspot.com/2012/08/the-must-build-arduino-project-illutron.html

Anyone watching falling skies ?

Duane B

rcarduino.blogspot.com


Go Up