{"id":18810713,"url":"https://github.com/jackw01/lsm303-python","last_synced_at":"2026-01-10T23:30:15.169Z","repository":{"id":62577051,"uuid":"293630567","full_name":"jackw01/lsm303-python","owner":"jackw01","description":"Python library for the LSM303 I2C accelerometer/magnetometer","archived":false,"fork":false,"pushed_at":"2020-09-11T23:17:22.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T07:18:44.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackw01.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}},"created_at":"2020-09-07T20:55:13.000Z","updated_at":"2024-08-01T12:16:49.000Z","dependencies_parsed_at":"2022-11-03T19:10:57.534Z","dependency_job_id":null,"html_url":"https://github.com/jackw01/lsm303-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackw01%2Flsm303-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackw01%2Flsm303-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackw01%2Flsm303-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackw01%2Flsm303-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackw01","download_url":"https://codeload.github.com/jackw01/lsm303-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239748254,"owners_count":19690232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-07T23:21:56.873Z","updated_at":"2026-01-10T23:30:14.110Z","avatar_url":"https://github.com/jackw01.png","language":"Python","readme":"# lsm303d-python\nPython library for the LSM303D I2C accelerometer/magnetometer\n\n## Usage\n1. Install the Python `smbus` module for your platform (`sudo apt install python-smbus` for Debian or Ubuntu Linux)\n2. `pip install lsm303-python`\n3. `sudo lsm303_test`\n\n## Example Code\n```python\nimport time\nimport smbus\nimport lsm303\n\ni2c_channel = 1\nbus = smbus.SMBus(i2c_channel)\n\n# Will raise OSError if device is not connected\ndevice = lsm303.LSM303(bus)\n\nwhile True:\n    # Returns x,y,z tuple with values in degrees/second\n    accel_data = device.read_accel()\n    # Returns x,y,z tuple with values in microtesla\n    mag_data = device.read_mag()\n    print(\n        [round(v, 2) for v in accel_data],\n        [round(v, 2) for v in mag_data]\n    )\n    time.sleep(0.1)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackw01%2Flsm303-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackw01%2Flsm303-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackw01%2Flsm303-python/lists"}