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 / log.txt
Created January 30, 2023 13:06
log
Down:
1675083830.681 | MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xab\x00\x005\x00\x00\x00'}, rssi=-49)
1675083830.694 | MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xab\x00\x00@\x00\x00\x00'}, rssi=-49)
1675083830.704 | MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xab\x00\x00J\x00\x00\x00'}, rssi=-49)
1675083830.714 | MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xab\x00\x00U\x00\x00\x00'}, rssi=-48)
@willwade
willwade / log.txt
Last active January 30, 2023 12:26
ble output
Full Press and release:
MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xa3\x00\x00\x00\x00\x00\x00'}, rssi=-45)
MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xa3\x00\x00\x0b\x00\x00\x00'}, rssi=-45)
MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xa3\x00\x00\x16\x00\x00\x00'}, rssi=-45)
MAC: 1A96C75A-5F25-34F9-EB06-0583B08021C1 | Adv: AdvertisementData(local_name='AeroSwitch', manufacturer_data={6026: b'\x15\x01\x00d\xa3\x00\x00 \x00\x00\x00'}, rssi=-45)
@willwade
willwade / logMessageChanges.py
Created October 10, 2022 11:26
Logs changes to a AAC software - to log when someone is using it or not
'''
Originally from matt.oppenheim@gmail.com for his https://github.com/mattoppenheim/microbit_activity_indicator
Hacked by Will - just logs if someone is writing or not. Used as a tool to detect how long someone is using their Aid for
Of course doesn't log if its person or someone helping
'''
from logging.handlers import RotatingFileHandler
import click
from datetime import datetime
import logging
@willwade
willwade / ar-Adult-Starter.md
Created September 21, 2022 15:53
Adult Starter Arabic

كلمات سريعة مساعدة قف الاختناق. تحتاج شفط. أكثر أقل دردشة كيف حالك؟ ماذا كنتم تفعلون؟ شكرا لك

@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