using GPI pins on an arduino to run a keyboard

 

#include <Keyboard.h>

// Define the GPIO pins for CTRL+A, CTRL+B, CTRL+C, and CTRL+D keys
#define A_PIN 2
#define B_PIN 3
#define C_PIN 4
#define D_PIN 5

void setup() {
// Set up the GPIO pins as inputs with pull-up resistors
pinMode(A_PIN, INPUT_PULLUP);
pinMode(B_PIN, INPUT_PULLUP);
pinMode(C_PIN, INPUT_PULLUP);
pinMode(D_PIN, INPUT_PULLUP);

// Initialize the keyboard library
Keyboard.begin();
}

void loop() {
// Check if the CTRL+A pin is pressed
if (digitalRead(A_PIN) == LOW) {
// Press and release the CTRL+A key combination
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(‘a’);
delay(50);
Keyboard.releaseAll();
}

// Check if the CTRL+B pin is pressed
if (digitalRead(B_PIN) == LOW) {
// Press and release the CTRL+B key combination
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(‘b’);
delay(50);
Keyboard.releaseAll();
}

// Check if the CTRL+C pin is pressed
if (digitalRead(C_PIN) == LOW) {
// Press and release the CTRL+C key combination
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(‘c’);
delay(50);
Keyboard.releaseAll();
}

// Check if the CTRL+D pin is pressed
if (digitalRead(D_PIN) == LOW) {
// Press and release the CTRL+D key combination
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(‘d’);
delay(50);
Keyboard.releaseAll();
}

// Wait for a short period of time before checking the pins again
delay(10);
}

Adult autism – coping

decided to stop focusing on being autistic and just be yourself. Since finding out you have autism, you’ve been hyper-focused on managing it, and it’s made you miserable. But you should realized that for ?? years, you didn’t know, and you didn’t struggle as much as you have recently. So now, you’re choosing to be aware of it without letting it define you. You know when you’re starting to get snippy or feel panic attacks coming on, and that’s your cue that you’re pushing too hard. You’re not autism; you just have it. You’re still going to give yourself permission to rest and educate yourself, but you’re done overcompensating and making things harder than they need to be. You’ve got mouths to feed, and you can’t afford to keep holding yourself back.

It’s all about realizing you’re the same person you’ve always been—just with different needs. You’re not broken, and you’re not going to keep telling yourself that you are. You’ve been struggling too much, but before, you just dealt with things. Now, you’re shifting your mindset and accepting that it is what it is. You’re not going to let the story you’ve been telling yourself work against you anymore.

Knowing yourself helps others understand you, and that’s really their problem, not yours. Embracing who you are, including the parts shaped by autism, is all part of the journey. You’ve realized that putting a name to your struggles has been freeing. Now, you can take control of your life again and face it with support, not just blindly pushing through.