{"id":21296933,"url":"https://github.com/reddec/mag3110-tools","last_synced_at":"2026-06-28T22:31:15.877Z","repository":{"id":81702527,"uuid":"63530575","full_name":"reddec/mag3110-tools","owner":"reddec","description":"MAG3110 API libraries and CLI Tools","archived":false,"fork":false,"pushed_at":"2016-07-17T15:15:47.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T05:05:43.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-17T12:22:15.000Z","updated_at":"2019-12-16T13:04:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"b84a1f4d-07e9-414a-9a13-3c397bf54b50","html_url":"https://github.com/reddec/mag3110-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reddec/mag3110-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmag3110-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmag3110-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmag3110-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmag3110-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/mag3110-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Fmag3110-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34906700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T14:31:09.327Z","updated_at":"2026-06-28T22:31:15.855Z","avatar_url":"https://github.com/reddec.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mag3110-tools\n\nAPI libraries and CLI Tools for MAG3110 sensor.\n\n[Datasheet](https://www.nxp.com/files/sensors/doc/data_sheet/MAG3110.pdf)\n\n## Obtain\n\n[You may use precompilled versions](https://github.com/reddec/mag3110-tools/releases) \nor build from source\n\n### Build requirements\n\n1. CMake 2.8\n2. Make\n3. C11 (gnu)  compiler\n4. I2C-supported linux kernel (all that I know)\n5. git (optional) for cloning\n\n### Build\n\nThis is generic CMake process.\n\nFirst, create new empty directory:\n\n    mkdir -p /tmp/build-mag3110\n    cd /tmp\n\nThen clone Git repo\n\n    git clone https://github.com/reddec/mag3110-tools.git\n\nUse CMake for prepare MAKE files:\n\n    cd /tmp/build-mag3110\n    cmake -DCMAKE_BUILD_TYPE=Release /tmp/mag3110-tools\n\nCompile and package:\n\n    make package\n\n\n### Install\n\nAfter build you can use one of following method:\n\n1. Use `mag3110-1.0.0-Linux.sh` as self-installer\n2. Use `mag3110-1.0.0-Linux.tar.gz` as binary tar-ball\n3. Use built files directly =)\n\n### Linking\n\nYou may use static or shared library.\n\n## CLI usage\n\n`mag3110 [-d data rate][-o oversampling][-i interval][-l name] \u003cdevice\u003e \u003caddress\u003e`\n\nWhere:\n\n* `device` (text, **required**) - path of I2C device (like /dev/i2c-1)\n* `address` (text, **required**) - address of sensor in device in HEX (like 0x52)\n* `-d` (type: number, *optional*)  - positive or zero value of data rate in range [0;8)\n* `-o` (type: number, *optional*)  - positive or zero value of oversampling ratio in range [0;4)\n* `-i` (type: number, *optional*)   - positive or zero value of scanning interval in milliseconds\n* `-l` (type: text, *optional*)     - use output format as InfluxDB line format with this name as measurment\n\n### Default output\n\nFormat: `\u003cname\u003eSPACE\u003cvalue\u003eSPACE\u003ctime in nanoseconds\u003eSPACE\u003cunit\u003e`\n\n    temp 22 287361999999000 c\n    magnetism-x 10001 287361999999000 c\n    magnetism-y 8733 287371999999000 c\n    magnetism-z -9877 287381999999000 c\n\n\n### InfluxDB output\n\nActivates by flag `-l \u003cname\u003e`\n\n    \u003cname\u003e temp=22,magnetism-x=10001,magnetism-y=8733,magnetism-z=-9877 287381999999000","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fmag3110-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Fmag3110-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Fmag3110-tools/lists"}