Hi,
I would like to present my Pincab with full force feed back for pinball FX2 (never seen before anyone who made it ?)
I apologize but i cant speak realy good english (french)
This Pincab add for pinball FX2 :
- Force feedback for flipper bat (ok not new)
- Force feedback for Bumpers
- Nudge (left right and front) with accelerometer
Force feedback for Bumpers
here is 2 videos (the sound you can hear is contactor, not pinball FX2 !)
https://www.youtube.com/watch?v=y1Zbd_waovM
https://www.youtube.com/watch?v=O96kMX6AVHA
all you need is
1 - CD4017
1 - CD4053
2 - SL5501
2 - BD237
1 - Arduino uno
2 contactor 24 v
1 power 24v DC
1 Xbox360 PC pad
20140713000442-Zed-photo.JPGbumper-plan.jpg
Code:
int ledPin = 13; // Arduino LED connected to digital pin 13
int inPin = 7; // input freq X360
int val = 0; // variable to store the read value
int tot_freq; // count of forcefeedback pulse
int changpin=4; // output to control count with CD4017
int pinpulse=6; // output to control Swap switch CD4053
int contactor_stat=0; // Stat of contactor (On / Off)
long time_contactor=0; // timer to reset contactor ON state
void setup(){
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(inPin, INPUT);
pinMode(changpin, OUTPUT);
pinMode(pinpulse, OUTPUT);
digitalWrite(changpin, 0);
}
void loop(){
val = digitalRead(inPin); // read the input pin
digitalWrite(ledPin, val);
if(val==0) tot_freq+=1;
if(val==1 && tot_freq>0) tot_freq=tot_freq-1;
if(tot_freq>=60){
time_contactor = millis();
digitalWrite(pinpulse, 0);
delay(10);
//---send bit to change counter in 595N
digitalWrite(changpin, 255);
digitalWrite(changpin, 0);
//--contactor ON
digitalWrite(pinpulse, 255);
//----------------------
contactor_stat=1;
tot_freq=0;
}
//---contactor OFF
if((millis() - time_contactor) > 100 && contactor_stat==1){
digitalWrite(pinpulse, 0);
contactor_stat=0;
}
delay(1);
}