def setup_keyboard(): username = os.getlogin() path_to_sdk_dll = "C:\\Users\\%s\\Google Drive\\nerd stuff\\keyboard\\CUESDK_2.18.127\\CUESDK\\redist\\i386\\CUESDK_2013.dll" % username sdk = CorsairSDK(path_to_sdk_dll) sdk.device_count() sdk.device_info(0) device = sdk.device(0) return device
def main(): username = os.getlogin() path_to_sdk_dll = "C:\\Users\\%s\\Google Drive\\nerd stuff\\keyboard\\CUESDK_2.18.127\\CUESDK\\redist\\i386\\CUESDK_2013.dll" % username sdk = CorsairSDK(path_to_sdk_dll) # eg. "C:\\cuesdk\\CUESDK.x64_2013.dll" print(sdk.device_count()) print(sdk.device_info(0)) device = sdk.device(0) print(device) tt = TapTester() while True: vol = int(tt.listen() * (255 / INITIAL_TAP_THRESHOLD)) if vol > 255: vol = 255 if vol < 0: vol = 0 for x in range(1, 154): device.set_led(x, [vol, 255 - vol, 0])
import os from cuepy import CorsairSDK username = os.getlogin() path_to_sdk_dll = "C:\\Users\\%s\\Google Drive\\nerd stuff\\keyboard\\CUESDK_2.18.127\\CUESDK\\redist\\i386\\CUESDK_2013.dll" % username sdk = CorsairSDK(path_to_sdk_dll) sdk.device_count() sdk.device_info(0) device = sdk.device(0) for key in range(1, 200): print(key) for keys in range(1, 200): if keys == key: device.set_led(keys, [255, 0, 0]) else: device.set_led(keys, [0, 0, 0]) input()
import cv2 from cuepy import CorsairSDK import os cv2.namedWindow("preview") vc = cv2.VideoCapture(0) username = os.getlogin() path_to_sdk_dll = "C:\\Users\\%s\\Google Drive\\nerd stuff\\keyboard\\CUESDK_2.18.127\\CUESDK\\redist\\i386\\CUESDK_2013.dll" % username sdk = CorsairSDK(path_to_sdk_dll) # eg. "C:\\cuesdk\\CUESDK.x64_2013.dll" device = sdk.device(0) if vc.isOpened(): # try to get the first frame rval, frame = vc.read() else: rval = False keyboard_map = [ [154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 97], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 73, 74, 75, 76, 0, 0, 0, 0, 0], [ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 85, 87, 77, 78, 79, 103, 104, 105, 106 ], [ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 80, 81, 88, 89, 90, 109, 110, 111, 107 ], [ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 82, 83, 0, 0, 0, 113, 114, 115, 0
from Tantallion import * import os import time import subprocess from random import shuffle import platform if platform.system() == 'Windows': from cuepy import CorsairSDK import musicbeeipc subprocess.Popen("C:\\Program Files (x86)\\MSI\\MSI LED Tool.exe") time.sleep(1) os.system('taskkill /IM \"MSI LED Tool.exe\" /F') cue = CorsairSDK('E:\\code\\CUESDK\\bin\\x64\\CUESDK.x64_2013.dll') keyboard = cue.device(0) for i in range(121): keyboard.set_led(i, [0, 0, 0]) patch = Patch() mb = musicbeeipc.MusicBeeIPC() web = patch.fixture('bedroom array') os.system('E:\\nircmd\\nircmd.exe setsysvolume 10000') mb.set_volume(100) def volumeDown(): vol = 100 for i in range(65): mb.set_volume(vol) vol -= 1