Skip to content

Instantly share code, notes, and snippets.

View heiko-r's full-sized avatar

Heiko Rothkranz heiko-r

  • Singapore
  • 23:07 (UTC +08:00)
View GitHub Profile
@heiko-r
heiko-r / mousebuttons.py
Last active September 5, 2023 03:35
Read mouse buttons from /dev/input/mice in Python
from enum import Enum, auto
import struct
INPUT_DEVICE = '/dev/input/mice'
class Button(Enum):
LEFT = auto()
RIGHT = auto()
MIDDLE = auto()
@heiko-r
heiko-r / ble_config.c
Created October 26, 2017 12:39
ESP32 BLE GATT server example
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "esp_system.h"
#include "esp_log.h"
#include "bt.h"
#include "bta_api.h"
#include "esp_gap_ble_api.h"
#include "esp_bt_main.h"