Skip to content

Instantly share code, notes, and snippets.

package org.hwyl.sexytopo.comms.sap6
import android.annotation.SuppressLint
import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothGatt
import android.bluetooth.BluetoothGattCallback
import android.bluetooth.BluetoothGattCharacteristic
import android.bluetooth.BluetoothGattDescriptor
import android.bluetooth.BluetoothManager
import android.bluetooth.BluetoothProfile
@furbrain
furbrain / usbip_helper.py
Created May 16, 2020 12:18
Wrapper for using usbip with specific programs
#!/usr/bin/env python3
import subprocess
import re
import sys
if sys.platform=="linux":
USBIP_EXEC = ["sudo", "/usr/bin/usbip"]
else:
USBIP_EXEC = ["C:\summat"]
PORTS = ["3240", "3241"]
@furbrain
furbrain / bearable.py
Last active February 15, 2018 16:49
Hacking the bearable
import smbus
import time
DEV_ADDRESS = 0x15
class Bearable():
def __init__(self):
self.bus=smbus.SMBus(1)
self.leds = [0]*12