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:
- SG90 Servomotor: https://www.amazon.com/Micro-Helicopter-Airplane-Remote-Control/dp/B072V529YD
- Potentiometer: (I used 1K, any resistance should work) https://www.amazon.com/Sscon-Breadboard-Potentiometer-Arduino-3386MP-102/dp/B07QX3BX9R
- 10K resistor & Photo resistor: https://www.amazon.com/DIYables-Photocell-Photoresistor-Arduino-Raspberry/dp/B0CM5YNGSF
- Any arduino: (I used a nano) https://www.amazon.com/10K-Resistor-Tolerance-Resistors-Resistance/dp/B0B4JFPHTW
- A protoboard to keep everything tidy.
- 2x M2 screws: The servos typically come with these
- Servo arm extender, i used and highly recommend this one by Codemers: https://www.printables.com/model/491795-servo-sg90-rounded-arm-extender
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
Etiketler
Model Kaynağı
