mirror of
https://github.com/gmh5225/awesome-game-security
synced 2026-06-21 13:56:22 +00:00
archive: add 5 repo prompt(s) [skip ci]
This commit is contained in:
@@ -0,0 +1,613 @@
|
||||
Project Path: arc_ZhaoKunqi_simple-eft-superman-training-bot_31z11rl4
|
||||
|
||||
Source Tree:
|
||||
|
||||
```txt
|
||||
arc_ZhaoKunqi_simple-eft-superman-training-bot_31z11rl4
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
├── TarkovBotCoordinateConverter.py
|
||||
├── main.ino
|
||||
└── old_useless_code_archives
|
||||
├── EFT-AutoRun-Endurance.ino
|
||||
├── EFT-AutoWalk-Strength.ino
|
||||
├── FullAutoRun.ino
|
||||
├── FullAutoWalk.ino
|
||||
└── dir-test.ino
|
||||
|
||||
```
|
||||
|
||||
`LICENSE`:
|
||||
|
||||
```
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Kunqi Zhao
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
```
|
||||
|
||||
`README.md`:
|
||||
|
||||
```md
|
||||
# Escape from Tarkov: Super Fierce Hatchling Full-Auto training bot
|
||||
|
||||
[English Document(This page)](README.md)
|
||||
|
||||
This bot is based on Arduino board that have USB capabilities, tested on Arduino Leonardo and Arduino Pro Micro(ATmega32u4).
|
||||
|
||||
# What super fierce hatchling training bot dose ?
|
||||
|
||||
this little project uses Arduino boards simulate Keyboards & Mice & Tablet , controlling your PC that running Escape from Tarkov game instance, mainly leveling up your in-game skills "**Endurance**", "**Strength**", "**Covert Movement**".
|
||||
|
||||
# How to run this bot and training your own muscle rat ?
|
||||
|
||||
1. You'll need a Arduino board that have ATmega32u4 processor on it(or supporting USB capabilitie), my recommendation is Arduino Leonardo(Arduino Official) or Arduino Pro Micro(3rd-party edition), because I've working on those 2 module for quite a while and all function running normal on those 2 module, if you have other Arduino board that supports USB, please feel free try it out yourself.
|
||||
|
||||
2. You'll need a PC capable to run EFT game instance at [1280x720 , minimal graphic quality, 30 FPS or higher]
|
||||
|
||||
3. You'll need Arduino IDE to upload the program into the board so your board can execute it.
|
||||
|
||||
4. No specific display resolution requirements, but must be 16:9, for example : 1280x720, 1600x900 , 1920x1080 , 2560x1440
|
||||
|
||||
|
||||
# How to upload the program into Arduino board ?
|
||||
|
||||
1. First ,you'll need install Arduino IDE, if you don't have Arduino IDE installed or have no idea how to install it , you can check Arduino's tutorial here https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing
|
||||
|
||||
2. And then, you'll need install some additional libraries from Arduino's repository, you'll need both "HID-Project" and "elapsedMillis" libraries installed, if you don't know how to install it , you can check Arduino's tutorial here https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library
|
||||
|
||||
3. Now you can upload those code into your Arduino board via USB connection, if you don't know how, you can read this tutorial from Arduino here https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-uploading-a-sketch
|
||||
|
||||
## If it says "uploading done" , then congratulations !
|
||||
|
||||
## Your Arduino board will start running muscle rat about 10 second later~
|
||||
|
||||
|
||||
# Tips:
|
||||
|
||||
1. recommend settings for EFT
|
||||
|
||||
- [x] Display resolution - 1280x720
|
||||
|
||||
- [x] Display method - fullscreen or windowed borderless
|
||||
|
||||
- [x] Graphics setting - Everything to minimal
|
||||
|
||||
- [x] Rendering scale - Lower the better
|
||||
|
||||
- [x] Lobby FPS limit - 60 FPS
|
||||
|
||||
- [x] Game FPS limit - 30 FPS
|
||||
|
||||
2. after tested it can run normally, you can turnoff your display for power saving
|
||||
|
||||
3. you'll need something inside your secure container to overweight your rat,if you don't have item can do that,you'll be unable to level-up your strength.
|
||||
|
||||
4. DO NOT carrying anything outside your secure container to overweight your rat, your rat will 100% lose those !!!
|
||||
|
||||
|
||||
# Warning!
|
||||
|
||||
##### Running this might get your game account ban, because Nikita is a super sadism , if he or his puppetry saw your running this, they will very unhappy ! and very possible to ban your account !
|
||||
|
||||
##### if you really get a ban, no liability or warranty ! before use this ,think twice !
|
||||
|
||||
# For Developers that trying to tweak this bot for yourself:
|
||||
|
||||
You can use TarkovBotCoordinateConverter.py to calculate coordinate yourself, so when tarkov add new button or something, you can edit the main.ino file to adapt new game buttons by yourself.
|
||||
|
||||
```
|
||||
|
||||
`TarkovBotCoordinateConverter.py`:
|
||||
|
||||
```py
|
||||
while 1:
|
||||
print("Please input total length:",end='')
|
||||
total_length=float(input())
|
||||
|
||||
multi=65536/total_length
|
||||
total_length=total_length/2
|
||||
print("Please input old coordinate:",end='')
|
||||
old_coordinate=float(input())
|
||||
result=old_coordinate-total_length
|
||||
result=result*multi
|
||||
|
||||
print(int(result))
|
||||
input()
|
||||
```
|
||||
|
||||
`main.ino`:
|
||||
|
||||
```ino
|
||||
#include "HID-Project.h"
|
||||
//Declare usage of HID-Project.h library in this project.
|
||||
//This project use HID-Project.h library for controlling the movement output to USB host via features that it provided including "Absolute Positioning Mouse" "Relative Positioning Mouse" "Keyboard"
|
||||
#include <elapsedMillis.h> //Declare usage of elapsedMillis library, this project use elapsedMillis library as a simple time counter.
|
||||
void setup() {
|
||||
delay(100);//Delay is required to reduce the possibility of failed execution or some USB connection problem. this also apply to all other delay in this project.
|
||||
Keyboard.begin(); //Start the virtual USB device "Keyboard"
|
||||
delay(100);
|
||||
AbsoluteMouse.begin();//Start the virtual USB device "Absolute Positioning Mouse"
|
||||
delay(100);
|
||||
Mouse.begin();//Start the virtual USB device "Mouse" aka the "Relative Positioning Mouse"
|
||||
delay(10000);//Wait 10 seconds before program execution , this reserved time is for re-uploading program or adjusting things in the USB host end before it starting pushing "W" button and running around while continually moving your mouse when you don't want it to happen.
|
||||
}
|
||||
|
||||
void loop() {
|
||||
enterRaid(); //call enterRaid function here for condition including "First time in cycle,game still in lobby and waiting to start","PMC got KIA in raid and after backToLobby function were executed, game in lobby and needs to enter the raid again". Also If PMC still alive in raid, this function will only make PMC waving melee weapon few times.
|
||||
//beginning exercising cycle
|
||||
walkingCycle();
|
||||
runningCycle();
|
||||
covertMovementCycle();
|
||||
//end exercising cycle
|
||||
backToLobby();//call backToLobby function here for condition of PMC got KIA in raid back to game lobby,same as the enterRaid function,if PMC still alive in raid, this function will only make PMC waving melee weapon few times.
|
||||
//beginning exercising cycle
|
||||
walkingCycle();
|
||||
runningCycle();
|
||||
covertMovementCycle();
|
||||
//end exercising cycle
|
||||
}
|
||||
|
||||
void walkingCycle(){
|
||||
// Easy walking cycle function
|
||||
startWalking(); //Press and hold "W" key to start walking
|
||||
//Set a 20 seconds timer continuously moving mouse towards right, make PMC circling in a limited area.
|
||||
elapsedMillis timeElapsed;
|
||||
unsigned int interval = 20000; //20 seconds timer
|
||||
while(timeElapsed < interval){
|
||||
//the following lines of codes is for a single cycle of mouse moving, it will loop and execute many cycles as possible during this 20 seconds timer.
|
||||
Mouse.move(3, 0);
|
||||
delay(2);
|
||||
}
|
||||
resetMoving(); //call resetMoving function, basically just release "W" key , and stop PMC from walking.
|
||||
delay(300); //relax 0.3 second and return to main loop, for next exercising.
|
||||
}
|
||||
void runningCycle(){
|
||||
startRunning(); //Similar to function "startWalking",it just added the press and hold left shift key in it.
|
||||
elapsedMillis timeElapsed; //Same as "walkingCycle" function. 20 seconds timer continuously moving mouse towards right, make PMC circling in a limited area, but running.
|
||||
unsigned int interval = 20000; //20s
|
||||
while(timeElapsed < interval){
|
||||
Mouse.move(5, 0);
|
||||
delay(1);
|
||||
}
|
||||
resetMoving();//call resetMoving function, release both "W" and "Left Shift" key , and stop PMC from running.
|
||||
delay(300);//He deserved this really short break time after running 20 seconds.
|
||||
}
|
||||
void covertMovementCycle(){
|
||||
//convert movement is a bit different from walking and running,it have 3 moves. The "SpeedDown","Moving Mouse","SpeedUp"
|
||||
//SpeedDown, scroll down mouse wheel to lowest walking speed, scroll many times as possible in 1.5 second.
|
||||
elapsedMillis timeElapsedSpeedDown;
|
||||
unsigned int intervalSpeedDown = 1500; //1.5s
|
||||
while(timeElapsedSpeedDown < intervalSpeedDown){
|
||||
Mouse.move(0,0,-1);
|
||||
delay(50);
|
||||
}
|
||||
//PMC walking speed now is the lowest as possible.
|
||||
startWalking();
|
||||
//and continuously moving mouse slowly after start walking in lowest speed.
|
||||
elapsedMillis timeElapsed;
|
||||
unsigned int interval = 20000; //20s
|
||||
while(timeElapsed < interval){
|
||||
Mouse.move(3, 0,0);
|
||||
delay(2);
|
||||
}
|
||||
delay(10);
|
||||
resetMoving();// release all key after 20 seconds of convert movement walking
|
||||
//SpeedUp, Similar to SpeedDown, scrolling mouse wheel up in 1.5 second.
|
||||
elapsedMillis timeElapsedSpeedUp;
|
||||
unsigned int intervalSpeedUp = 1500;
|
||||
while(timeElapsedSpeedUp < intervalSpeedUp){
|
||||
Mouse.move(0,0,1);
|
||||
delay(50);
|
||||
}
|
||||
delay(300);// The 20 seconds of ninja's walking posture is also very tired, please .
|
||||
}
|
||||
|
||||
|
||||
void startWalking(){
|
||||
Keyboard.press('w');//simply going forward~
|
||||
}
|
||||
void startRunning(){
|
||||
Keyboard.press('w');
|
||||
delay(100);// add some delay make it smother.
|
||||
Keyboard.press(KEY_LEFT_SHIFT);
|
||||
}
|
||||
|
||||
void resetMoving(){
|
||||
Keyboard.releaseAll();//Release all key to stop current moving.
|
||||
}
|
||||
void enterRaid(){
|
||||
delay(300);
|
||||
AbsoluteMouse.moveTo(0, 6000); //Move to "Escape from Tarkov" button
|
||||
clickLeftMouseButton();
|
||||
AbsoluteMouse.moveTo(0, 23210); //Move to "NEXT" button
|
||||
clickLeftMouseButton();
|
||||
AbsoluteMouse.moveTo(-13030,-1547); //Move to default "Reserve" button
|
||||
//Also you can modified map selection movement by yourself.
|
||||
//There is a coordinate list of maps in the game:
|
||||
//Interchange (-307,-14700)
|
||||
//Woods (-9728,-12242)
|
||||
//Customs(-2688,-10922)
|
||||
//Factory(-7552,-5961) this is a bit stupid tbh, but you can try that out lol
|
||||
//Reserve(-13030,-1547)
|
||||
//Shoreline (-9728, 10467)
|
||||
//Lighthouse (-9728, 10467)
|
||||
//Street (-9728, 10467)
|
||||
//I never played tarkov after lighthouse patch, so feel free add lighthouse coordinate yourself by TarkovBotCoordinateConverter.py
|
||||
clickLeftMouseButton();
|
||||
AbsoluteMouse.moveTo(10163, 28535); //Move to "Ready" button
|
||||
clickLeftMouseButton();
|
||||
}
|
||||
void backToLobby(){
|
||||
delay(300);
|
||||
AbsoluteMouse.moveTo(0, 25486); //Move to "Next" button
|
||||
//Click "Next" button 4 times
|
||||
clickLeftMouseButton();
|
||||
clickLeftMouseButton();
|
||||
clickLeftMouseButton();
|
||||
clickLeftMouseButton();
|
||||
AbsoluteMouse.moveTo(-5529, -13380); //Move to "General health condition" button
|
||||
clickLeftMouseButton(); //Click "General health condition" button to deselect it, because bot only needs heal bleeding and fracture
|
||||
AbsoluteMouse.moveTo(11136, 25486); //Move to "Apply" button
|
||||
clickLeftMouseButton(); //Click "Apply" button to heal PMC's bleeding and fractures
|
||||
AbsoluteMouse.moveTo(0, 25486); //Move to "Next" button
|
||||
clickLeftMouseButton(); //Click "Next" button to and back to lobby
|
||||
}
|
||||
void clickLeftMouseButton(){
|
||||
delay(300);
|
||||
AbsoluteMouse.click();//Just click~
|
||||
delay(300);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
`old_useless_code_archives/EFT-AutoRun-Endurance.ino`:
|
||||
|
||||
```ino
|
||||
#include <Keyboard.h>;
|
||||
#include <Mouse.h>;
|
||||
bool alpha;
|
||||
void setup(){
|
||||
attachInterrupt(1,startButton,FALLING);
|
||||
attachInterrupt(2,stopButton,FALLING);
|
||||
Mouse.begin();
|
||||
Keyboard.begin();
|
||||
alpha=false;
|
||||
}
|
||||
void(* resetFunc) (void) = 0;
|
||||
void loop(){
|
||||
if(alpha){
|
||||
delay(50);
|
||||
Keyboard.press('w');
|
||||
delay(50);
|
||||
Keyboard.press(KEY_LEFT_SHIFT);
|
||||
delay(20000);
|
||||
Keyboard.releaseAll();
|
||||
delay(50);
|
||||
Keyboard.press('w');
|
||||
delay(20000);
|
||||
Keyboard.release('w');
|
||||
delay(50);
|
||||
turnBack();
|
||||
delay(50);
|
||||
}
|
||||
}
|
||||
void startButton(){
|
||||
alpha=true;
|
||||
}
|
||||
void stopButton(){
|
||||
alpha=false;
|
||||
delay(50);
|
||||
Keyboard.releaseAll();
|
||||
delay(50);
|
||||
resetFunc();
|
||||
}
|
||||
void turnBack(){
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(200,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(1,0,0);
|
||||
delayMicroseconds(10000);
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
`old_useless_code_archives/EFT-AutoWalk-Strength.ino`:
|
||||
|
||||
```ino
|
||||
/*
|
||||
* This is a sketch that can upload to Arduino Leonardo
|
||||
* Use for Strength Skill training in PC video game <Escape From Tarkov>
|
||||
* All function in this sketch is make overweight PMC keep walking in a small space
|
||||
* Keep using this sketch 10 min,the overweight PMC's Strength skill will increase 2.5
|
||||
* Keep using this sketch 20 min,the overweight PMC's Strength skill will increase 5.0
|
||||
* Keep using this sketch 30 min,the overweight PMC's Strength skill will increase 7.5
|
||||
*/
|
||||
#include <Keyboard.h>
|
||||
#include <Mouse.h>
|
||||
bool alpha; //Setup a public bool var for interrupt button status
|
||||
void setup(){
|
||||
attachInterrupt(1,startButton,FALLING); //Blue button for start walking
|
||||
attachInterrupt(2,stopButton,FALLING); //Red button for stop walking
|
||||
Mouse.begin();
|
||||
Keyboard.begin();
|
||||
alpha=false; //Setup default vaule as false make working will not start automatic
|
||||
}
|
||||
void loop(){
|
||||
if(alpha){
|
||||
Mouse.move(1,0,0); //If Blue button been hit before,this will running
|
||||
}
|
||||
}
|
||||
void startButton(){
|
||||
alpha=true; //Set alpha as true make loop enable
|
||||
Keyboard.press('w'); //Press and hold the 'w' on keyboard to start walking
|
||||
}
|
||||
void stopButton(){
|
||||
alpha=false; //Set alpha as false make loop disable
|
||||
Keyboard.release('w'); //Release 'w' on keyboard to stop walking
|
||||
Keyboard.releaseAll(); //Release all button to make sure walking are stoped
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
`old_useless_code_archives/FullAutoRun.ino`:
|
||||
|
||||
```ino
|
||||
#include <Keyboard.h>;
|
||||
#include <Mouse.h>;
|
||||
void setup(){
|
||||
delay(3000);
|
||||
Mouse.begin();
|
||||
delay(50);
|
||||
Keyboard.begin();
|
||||
delay(50);
|
||||
}
|
||||
void loop(){
|
||||
delay(100);
|
||||
Keyboard.press('w');
|
||||
delay(100);
|
||||
Keyboard.press(KEY_LEFT_SHIFT);
|
||||
delay(20000);
|
||||
Keyboard.releaseAll();
|
||||
delay(150);
|
||||
Keyboard.press('w');
|
||||
delay(20000);
|
||||
Keyboard.release('w');
|
||||
delay(100);
|
||||
turnBack();
|
||||
delay(100);
|
||||
}
|
||||
void turnBack(){
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(200,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(1,0,0);
|
||||
delayMicroseconds(10000);
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
`old_useless_code_archives/FullAutoWalk.ino`:
|
||||
|
||||
```ino
|
||||
#include <TimerOne.h>
|
||||
#include <Keyboard.h>
|
||||
#include <Mouse.h>
|
||||
int timerCount;
|
||||
void setup(){
|
||||
Timer1.initialize(3000000);
|
||||
delay(30);
|
||||
Timer1.attachInterrupt(timerInterrupt);
|
||||
delay(30);
|
||||
Mouse.begin();
|
||||
delay(30);
|
||||
Keyboard.begin();
|
||||
delay(30);
|
||||
timerCount=0;
|
||||
delay(3000);
|
||||
Keyboard.press('w');
|
||||
}
|
||||
void loop(){
|
||||
Mouse.move(1,0,0);
|
||||
delay(3);
|
||||
}
|
||||
void timerInterrupt(){
|
||||
if(timerCount<=6){
|
||||
timerCount++;
|
||||
}else{
|
||||
timerCount=0;
|
||||
stopAndStart;
|
||||
}
|
||||
}
|
||||
void stopAndStart(){
|
||||
delay(30);
|
||||
Keyboard.release('w');
|
||||
delay(500);
|
||||
Keyboard.press('w');
|
||||
delay(30);
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
`old_useless_code_archives/dir-test.ino`:
|
||||
|
||||
```ino
|
||||
#include <Mouse.h>;
|
||||
bool alpha;
|
||||
void setup(){
|
||||
attachInterrupt(1,startButton,FALLING);
|
||||
Mouse.begin();
|
||||
}
|
||||
void loop(){}
|
||||
void startButton(){
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(200,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(600,0,0);
|
||||
delayMicroseconds(10000);
|
||||
Mouse.move(1,0,0);
|
||||
delayMicroseconds(10000);
|
||||
}
|
||||
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user