MrOneTwo / magknob

AS5601 magnetic, rotary sensor controlling PC through USB HID device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

builds.sr.ht status

MagKnob

This project is a knob for controlling volume (or anything that a USB keyboard can). It uses a AS5601 sensor as an encoder. It was developed using Bluepill board.

You can download OpenSCAD designed models for 3D printing.

Building this project

Dependencies:

The quickest way is to use just:

git clone https://git.sr.ht/~mronetwo/magknob
just setup_toolchain
make
bash flash.sh src/magknob.bin

Technical information

The linker script is the src/memory.ld which includes cortex-m-generic.ld, from libopencm3.

The startup code lives in the libopencm3/lib/cm3/vector.c. It also provides a structure that provides the stack address and the handlers.

You can check the loaded objects in the src/mapfile, example:

LOAD board.o
LOAD printf.o
LOAD main.o
LOAD as5601.o
LOAD profile_trace.o
LOAD ../libopencm3/lib/libopencm3_stm32f1.a
LOAD /home/mc/gits/magknob/toolchain/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a

About

AS5601 magnetic, rotary sensor controlling PC through USB HID device

License:GNU General Public License v3.0


Languages

Language:C 95.2%Language:Perl 2.1%Language:Makefile 1.7%Language:Python 0.8%Language:Shell 0.1%Language:Assembly 0.1%Language:HTML 0.0%