Skip to content

Instantly share code, notes, and snippets.

View rockavoldy's full-sized avatar

Akhmad Maulana Akbar rockavoldy

View GitHub Profile
@rockavoldy
rockavoldy / HID Report Descriptor.md
Created October 27, 2024 03:23
HID Report Descriptor, usage and usage page and some examples. From chatgpt

Certainly! HID descriptors can be a bit complex, but here’s a breakdown of common Usage Pages and Usages, along with their options. This will help when designing HID devices like gamepads, joysticks, keyboards, and more.

1. Usage Pages

  • Usage Pages group related Usages (specific controls) together.
  • Usage Pages are defined by a 16-bit identifier.
Usage Page Name ID (Hex) Description
Generic Desktop Controls 0x01 Basic controls like joysticks, mice, keyboards, etc.
Simulation Controls 0x02 Controls for simulation devices, such as flight controls and vehicles.
@rockavoldy
rockavoldy / Servo Motor.md
Created February 1, 2024 17:44
Schneider Electric BCH0802O11A1C

Servo Motor Schneider Electric

I'm looking for servo motor that have incremental encoder with ABZ output pin for my DIY Steering Wheel, and i got servo motor from Schneider Electric with code BCH0802O11A1C. It's hard to find the correct specification since it seems the same code have been used in new batch with slightly different specification (changing the encoder to 20bit absolute encoder).

So, this document here exist to document all of the specification for this servo motor, also the pinout (yeah, that's the IMPORTANT part 😃).

Note

All of this information is taken from LXM23 Manual (NOT Lexium 23 Pro, which will have the same motor code, but actually it's different version with only 20bit absolute encoder)

Power pinout

Important

  • The connection is seen from the female-side of the connector. If you only have servo motor which have the male-side of the connector, you need to see the connection from where the
@rockavoldy
rockavoldy / fractal-modular-pinout.md
Last active September 20, 2023 14:00
Fractal design ION+ 560P Modular

PSU Fractal Design modular pinout

First thing first, Do with your own risk!

This is the pinout guide for my Fractal Design ION+ 560W Modular cable.

Fractal pinout

fractal-psu-side-pinout

ATX 24 pin pinout

atx-male-24-pin-pinout

@rockavoldy
rockavoldy / cc3d-crsf.md
Created August 21, 2023 05:52
Use CC3D as CRSF-to-PWM

CC3D as CRSF-to-PWM

Have CC3D lying around, but can't use it with ELRS since it's not supported on the latest betaflight or INAV firmware CC3D have.

  1. Clone this repository CapnBry/CRServoF
  2. Build with TARGET CC3D
  3. Flash using STLink

MainPort and FlexiPort pinout Serial cable pinout | Pin number | Function |

@rockavoldy
rockavoldy / build-and-flash-cyber60-zmk.md
Created May 26, 2023 10:26
Build and flash firmware Cyber60

Build and Flash Cyber60 ZMK on Apple Silicon

Make sure homebrew already installed

  1. Prepare some dependencies needed to build firmware
    brew install cmake ninja gperf python3 ccache qemu dtc wget libmagic
  2. Download and setup latest zephyr-sdk from zephyrproject/project-rtos
    wget -c https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.1/zephyr-sdk-0.16.1_macos-aarch64.tar.xz
@rockavoldy
rockavoldy / loki-config.yaml
Last active May 18, 2023 16:35
loki and promtail config for odoo log
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
common:
instance_addr: 127.0.0.1
path_prefix: /tmp/loki
storage:

Apache Camel

Apache Camel is an integration framework that allows to integrate different systems using various protocols and technologies. By default, there already a lot of pre-built connectors, components, and processors that make it easy to integrate different systems and applications.

Apache Camel works by create a route to specify how messages should be processed and passed between endpoints. a route usually starts with source, and ends with a destination, then we can manipulate data between source and destination using pre-built processor that Camel has.

There is some ways to use Apache Camel, but in this documentation, we will use Camel K which deployed in kubernetes cluster, which we can easily interact with it using API, and it will treat a route as a dedicated pod.

Setup Camel K first

  1. Install Camel K First on a cluster, can use minik

Merge CSV with Pandas

import pandas
import csv

# read csv first
first_data = pandas.read_csv('first_data.csv')
second_data = pandas.read_csv('second_data.csv')

Install external VTX and RX

CrazyBee X12 AIO ELRS v2.1

Pagination with Ellipsis

Says you have total pages = 12

  1. Current page = 1
1, 2, 3, ..., 12
  1. Current page = 2
1, 2, 3, 4, ..., 12