Skip to content

Instantly share code, notes, and snippets.

View willwade's full-sized avatar
🌏
Working on dasher and a lot of Ace hardware projects

will wade willwade

🌏
Working on dasher and a lot of Ace hardware projects
View GitHub Profile
@willwade
willwade / TTSfromClipboard.py
Last active July 20, 2022 14:26
TTSfromClipboard.py. A quick hacky go at making a script from reading the pasteboard. Its not great -and you cant change voices unless you hard coded it. And we'd need to do some funky stuff like NLTK to find last para or last sentence.
from pynput import keyboard
import pyperclip
import pyttsx3
converter = pyttsx3.init()
# Sets speed percent
# Can be more than 100
converter.setProperty('rate', 100)
# Set volume 0-1
converter.setProperty('volume', 1)
listenAllTime = False
@willwade
willwade / paperclip.py
Last active May 25, 2022 05:52
pasteboard buffer. Two commands. Set one to listen - and then you can run it again with rewrite and it will rewrite your copy history to -1
import pyclip
import typer
import time
from typing import Optional
import sqlite3
conn = sqlite3.connect('copyhistory.sqlite')
global max_history
max_history = 5
now_list = ""
@willwade
willwade / Mouse2Keypress.ahk
Last active January 11, 2022 19:59
Mouse2Keypress - This AHK Script recognises any movement (you can adjust the sensitivity) and then sends a space bar.
#persistent
coordmode, mouse, screen
mousegetpos, sx, sy
settimer, check, 250
return
check:
mousegetpos, cx, cy
@willwade
willwade / ServerPy.py
Created December 22, 2021 10:02
DemoSendSwitchPress circuitPy code
import os
import serial
from time import sleep
from sys import exit
import sys
import serial.tools.list_ports
import logging
import argparse
@willwade
willwade / mousemovestick.ino
Last active October 25, 2021 21:04
mousemove-stick. Wire it up like http://exploreembedded.com/wiki/Analog_JoyStick_with_Arduino - this is for a standard Arduino board that supports Mouse HID. Leonardo or similar.
const int xAxis = A0; //analog sensor for X axis
const int yAxis = A1; // analog sensor for Y axis
int range = 12; // output range of X or Y movement
int responseDelay = 2; // response delay of the mouse, in ms
int threshold = range/4; // resting threshold
int center = range/2; // resting position value
int minima[] = {
1023, 1023}; // actual analogRead minima for {x, y}
int maxima[] = {
@willwade
willwade / blink2key.py
Last active October 20, 2021 13:54
Blink detection and output as a keystroke. Based heavily on this code https://github.com/AceCentre/EyeCommander/issues/10#issuecomment-922273286
import click
import cv2 as cv
import mediapipe as mp
import time
import utils
import math
import numpy as np
import sys
from pynput.keyboard import Key, Controller, KeyCode
@willwade
willwade / AACAppsLoggingDetails.md
Last active May 12, 2021 15:32
Phrase Historys in AAC Apps
@willwade
willwade / code.py
Last active January 25, 2021 11:13
Presses Home keys, then types predictable. Useful for disabled people waking up a iPad. This is in circuitPython.
"""
Whatever state the iPad is in this code will wake the device up
Attach a button to Feather nRF52840. Set the pin on line 21.
WARNING 1: DO NOT HAVE A PASSCODE FOR IPAD!
WARNING 2: NOT FULLY TESTED. Dare say there are some use cases where this will go wrong. Like if iPad doesnt wake up quick enough
WARNING 3: Feel free to adapt line 59 to the app of your choosing BUT if the app isnt on the device it wont work.
"""
import time
import board
from digitalio import DigitalInOut, Direction, Pull
فوری الفاظ
مدد
رکو
دم گھٹ رہا ہے۔ سکشن کی ضرورت ہے۔
مزید
کم
چیٹ
آپ کیسے ہو؟
تم کیا کرتے رہے ہو؟
شکریہ
@willwade
willwade / SwitchBoxes.md
Last active August 11, 2020 14:52
Switch Boxes
Switch box Switch number Connection Key press supported Accept options