Hello,
I'm creating my own rapid fire, right now I'm using the arduino platform, but once the code is finished i plan on taking the chip out of the arduino and putting it into the controller by itself. I've got most of the bugs worked out of the code, notice it's only one trigger right now. I've still got to finish connecting things inside the controller, and add a few small things to the code, but the code proof of concept works quite well. To create the pulses, I'm actually using pwm, suppled by the arduino. So far, the rapid fire works very well in halo 3, but it doesn't do anything at all in gears. Does anyone know the cap rate of fire for gow2? Notice in the code there are three different modes right now, two are working, one is simply a placeholder for burst or whatever i want. Thanks for the help!
heres the code
int switchPin = 3;
int rledPin = 13;
int rt = 0;
int val1;
int val;
int val2;
int buttonState;
int rts = 10;
int lightMode = 0;
void setup() {
pinMode(switchPin, INPUT);
pinMode(rt, INPUT);
pinMode(rledPin, OUTPUT);
Serial.begin(9600);
buttonState = digitalRead(switchPin);
}
void loop(){
val = digitalRead(switchPin);
delay(10);
val2 = digitalRead(switchPin);
if (val == val2) {
if (val != buttonState) {
if (val == LOW) {
if (lightMode == 0) {
lightMode = 1;
} else {
if (lightMode == 1) {
lightMode = 2;
} else {
if (lightMode == 2) {
lightMode = 3;
} else {
if (lightMode == 3) {
lightMode = 0;
}
}
}
}
}
}
buttonState = val;
}
if (lightMode == 0) {
digitalWrite(rledPin, LOW);
}
if (lightMode == 1) {
digitalWrite(rledPin, HIGH);
val1 = analogRead(rt);
if (val1 >= 230) {
analogWrite(rts, 75);
delay(10);
}
}
if (lightMode == 2) {
digitalWrite(rledPin, HIGH);
delay(100);
digitalWrite(rledPin, LOW);
delay(100);
val1 = analogRead(rt);
if (val1 >= 230) {
analogWrite(rts, 2);
delay(10);
}
}
if (lightMode == 3) {
Serial.println("mode 3");
}
}