1 / 3
Automatic Lightning Dodge Device (FFX) — zdjęcie 1
1 / 3

Automatic Lightning Dodge Device (FFX)

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

How dodge 200 lightning strikes in a row using Science!

Ocena
0 / 5
Polubienia
3
Pobrania
8
Wydruki
0
Wyświetlenia
309
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Video Games
Licencja
Creative Commons — Attribution

I was playing Final Fantasy X and becoming frustrated trying to dodge 200 lightning strikes in a row, so I built a device to do it for me! Why spend an hour doing something when you can spend 3 automating it. Designed to work with a keyboard for the PC version, but could probably work on a controller with some jerry-rigging.

The devise uses a photo resistor pressed up against the screen to watch for the flash that indicated a lightning strike is coming and triggers a servo to push the dodge key (C) in time to dodge 100% of the time. The potentiometer allows for live tuning of the sensitivity so it only triggers on a lightning flash. The wiring diagram shows how to wire it to match up with the code.

Will technically work with just USB power, but is easier to calibrate when connected to a computer that has access to the serial plotter. In the plotter photo, the blue line is the potentiometer value, the green line is the photo resistor value, and the red line is the dodge counter. Use the pot to move the blue line high enough that the green line only crosses it when the flash happens. When the red line crosses 200 you're done!

Bill of materials:

Printed parts:

  • Servo Stand: Print on side, holds the servo above a keyboard.
  • Photo resistor Cup: enshrouds the photo resistor so ambient light doesn't affect the measurement.

The Code: (I'm just a mechanical engineer go easy on me)

//Cross_Engineering 5/4/25
#include <Servo.h> //make sure the Servo plugin is installed
Servo myservo;

int ServoRest = 115; //servo rest position in degrees, adjust as needed to rest position is horizontal int ServoMove = 20; //servo travel in degrees, adjust if needed int ServoPush = ServoRest+ServoMove;

int count = 0; //counts activation cycles to send over serial monitor

int PhotoPin = A5; //sense pin for photoresistor, must be analog pin int AdjustPin = A2; //sense pin for pot, must be analog pin int LEDpin = 13; //pin13 has a built-in LED (may need to change if using different board) int AdjustPower = 10; //I used a digital pin for pot power, could just connect to 5V out instead int PhotoValue = 0;
int AdjustValue = 0;

void setup() { // put your setup code here, to run once: pinMode(AdjustPower,OUTPUT); pinMode(LEDpin,OUTPUT); myservo.attach(5); //pin that servo DATA (yellow) wire is attached to Serial.begin(9600); myservo.write(ServoRest); //moves servo to rest position on startup }

void loop() { // put your main code here, to run repeatedly: digitalWrite(AdjustPower, HIGH); //see above, I used D10 to power the pot PhotoValue = analogRead(PhotoPin); //read photoresistor voltage AdjustValue = analogRead(AdjustPin); //read potentiometer voltage Serial.print(AdjustValue); //output pot and photoresistor voltage, and cycle count to serial Serial.print(","); Serial.print(count); Serial.print(","); Serial.println(PhotoValue);

if (AdjustValue<PhotoValue){ //servo triggers when photoresistor voltage exceeds potentiometer voltage digitalWrite(LEDpin,HIGH); //The pin 13 LED turns on whenever the servo triggers myservo.write(ServoPush); delay(100); myservo.write(ServoRest); count=count+1; delay(2000); digitalWrite(LEDpin,LOW); }

}

 

Tagi