Easy DIY $7 Anti Afk Kicker for (almost) All Situations
by 188579 in Circuits > Raspberry Pi
133 Views, 2 Favorites, 0 Comments
Easy DIY $7 Anti Afk Kicker for (almost) All Situations
Have you ever been kicked from a game or chat room for being inactive or "AFK" (Away From Keyboard) for too long? It's a frustrating experience to come back to your computer and find that you've been automatically disconnected. But fear not, because in this tutorial, we will be showing you how to make an anti-AFK kicker using a Raspberry Pi Pico - a small and affordable microcontroller that costs only $7!
With this project, you'll be able to send keystrokes to your computer every x seconds to simulate activity, preventing you from being kicked out of games or chat rooms due to inactivity. It's an easy-to-follow tutorial that anyone can do, regardless of experience with coding or electronics. Even if you're a beginner, you'll be able to complete this project in no time!
Supplies
--a pc/laptop running mac windows or linux
--a raspberry pi pico https://bit.ly/3MeO8sX (Not an affiliate link, just the cheapest I could find.)
Prepare Your Pi and Your Pc
The Raspberry Pi Pico is a small computer board that you can use to create your own electronic projects. It has a tiny computer chip on it that you can program to do different things. In this step, we will connect the Pi to your PC and set everything up so that it is able to run programs. It's already 75% of the entire project! Don't worry about programming – it's not hard, and I will provide an example script.
First, let's set up the Raspberry Pi:
- Download the newest Cuircuitpython firmware version here.
- Insert one end of the cable into your PC (but don't connect it to your Pico yet!).
- Press and hold the "BOOTSEL" button (shown in the image).
- Insert the other end of the cable into your Raspberry Pi (you can release the button after inserting the cable).
- The Raspberry Pi should now show up as a USB drive.
- Drag and drop the downloaded firmware file into the USB drive.
- Congratulations! Your Raspberry Pi is now ready to be programmed.
Now, let's set up your PC:
- Download and install Thonny from https://thonny.org.
- Open Thonny and click on "Tools" in the top bar.
- Click "Options."
- Open the "Interpreter" tab.
- In the drop-down menu, select "Cuircuitpython (generic)."
- Your PC should now be connected to your Raspberry Pi.
Start Programming
Let's program our anti-AFK kicker!
- Go to Thonny and click "View" to enable "Files." You should now see all files stored on your Pico. If it doesn't work, click the red button at the top to reset your connection. It should now look something like the image.
- Now, we will install the keyboard library, which is an app that helps the Pico send fake keyboard input. Download the drive from here: (https://github.com/adafruit/Adafruit_CircuitPython_HID)
- Extract the ZIP file and navigate to the "adafruit_hid" folder. Copy and paste the file to the "lib" folder on the Pico.
- Next, copy the script from here: (https://pastebin.com/MKPRMfnL) and paste it in the empty space in the middle of the Thonny editor.
- adjust the number at the first line to change the timeout
- Press the green button to run the script. It will ask you where to save the script. Select "CircuitPython device" and name the file "main.py."
- Congratulations, you have just made your anti-AFK kicker!