Skip to content

Instantly share code, notes, and snippets.

@HappyCodingRobot
HappyCodingRobot / xanes_xi_protocol_rev_eng.md
Created February 7, 2018 13:17
XANES X1 Programmable LED light badge protocoll reverse engineering

XANES X1 Programmable LED light badge protocoll reverse engineering

General informations

  • VID:PID - 0416:5020
  • Product ID: LS32 Custm HID
  • uses HID Protocoll
  • 2 endpoints, uses endpoint 1 for data, all with report 0
  • 64 byte paket size

The Protocol

@HappyCodingRobot
HappyCodingRobot / Scheduler_Example.c
Last active August 22, 2019 19:32
Very basic Round Robin scheduler for AVR
#include <avr/io.h>
#include <avr/interrupt.h>
#include <inttypes.h>
#include "scheduler.h"
// Task definitions
#define nTask1 1
#define nTask2 2
@HappyCodingRobot
HappyCodingRobot / multimeter.py
Created December 11, 2015 17:00
Reading data from Voltcraft VC506 multimeter for long-term measurements
#!/usr/bin/python
'''
Read data from Voltcraft VC506
and write to file or console
see:
https://pythonhosted.org/pyserial/
'''
import serial
import time
@HappyCodingRobot
HappyCodingRobot / tmp100_i2c_read.py
Created October 29, 2015 20:42
Reading TI TMP100 sensor via i2c and libmpsse
# -*- coding: utf-8 -*-
from mpsse import *
import time
i2c = MPSSE(I2C, FOUR_HUNDRED_KHZ)
#i2c = MPSSE(I2C, ONE_HUNDRED_KHZ)
# Adress: \x4A (base) -> write: \x94 , read: \x95
# Configuration: \x60 (01100000b : 12bit resolution)
@HappyCodingRobot
HappyCodingRobot / Makefile
Last active December 7, 2017 19:04
slightly enhanced Arduino makefile framework
# Hey Emacs, this is a -*- makefile -*-
#
# see: http://ed.am/dev/make/arduino-mk
#
# SOURCES := main.c other.cpp
# LIBRARIES := EEPROM SPI Adafruit_GFX Adafruit_ST7735
# LIBRARYPATH :=
# CPPFLAGS := -std=c++11 -Wl,-Map=foo.map -Wa,-aln=OUT.s
# SERIALMON := cutecom
#
@HappyCodingRobot
HappyCodingRobot / LED_cie1931.py
Created June 6, 2015 16:20
Create correction table for PWM values based on CIE1931 algorithm
#!/usr/bin/python3
#
''' Script to create a correction table for PWM values
to create linear brightness for a LED
based on the CIE1931 algorithm
original author: ??
'''
PWM_BIT_SIZE = 8 # Bit size of used PWM
CORR_TABLE_SIZE = 16 # Number of elements in vector
####
@HappyCodingRobot
HappyCodingRobot / rpi.py
Created May 14, 2015 12:10
Simple XBMC/Kodi controller via http POST request and JSONRPC
#!/usr/bin/python
'''
Very simple XBMC/Kodi controller via http POST request and JSONRPC
(testing the principle..)
'''
import httplib
import sys, argparse
import json
PI = '192.168.162.33'