{"id":21195020,"url":"https://github.com/plusk01/teensyimu","last_synced_at":"2026-04-08T14:32:17.507Z","repository":{"id":82488794,"uuid":"315304672","full_name":"plusk01/teensyimu","owner":"plusk01","description":"real-time processing of imu on desktop sampled from teensy","archived":false,"fork":false,"pushed_at":"2024-08-28T00:48:10.000Z","size":1122,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-20T10:42:18.948Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plusk01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-11-23T12:14:23.000Z","updated_at":"2024-08-28T00:48:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3689ec27-e61d-4d78-8b4e-485151a6d0c8","html_url":"https://github.com/plusk01/teensyimu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/plusk01/teensyimu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fteensyimu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fteensyimu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fteensyimu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fteensyimu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plusk01","download_url":"https://codeload.github.com/plusk01/teensyimu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plusk01%2Fteensyimu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31559789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-20T19:25:44.644Z","updated_at":"2026-04-08T14:32:17.482Z","avatar_url":"https://github.com/plusk01.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Real-time IMU Processing from Teensy\n====================================\n\nSupporting software to stream IMU (Adafruit ICM-20948) connected to Teensy 4.0 via SPI onto desktop computer via serial. Serial IO is handled in C++ and exposed to Python with pybind11.\n\n## Getting Started\n\nThis repo provides the `teensytools` Python package to allow easy access to the hardware from Python. The Python package includes the C++ serial driver for quickly communicating with the teensy. The C++ is transparent to the user via `pybind11`. This Python package can be installed using the pre-built binaries via `pip` or by building from source yourself.\n\nOnce `teensytools` is installed on your machine, you will be able to quickly plot data (see **Examples** below) like:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/wiki/plusk01/teensyimu/assets/teensy.plotfreq.png\" width=\"70%\" /\u003e\n\u003c/p\u003e\n\n### Installing via `pip`\n\n***Note**: Only Python 3 is supported. When a command uses `python` or `pip`, you may need to replace with `python3` or `pip3` depending on your system. You can always use `python --version` or `pip --version` to check which version is being used.*\n\nFor the following systems, the `teensyimu` Python package can be easily installed using `pip` and without requiring building from source: `ubuntu-18.04`, `ubuntu20.04`, `macos-catalina` (potentially `macos-bigsur`), `windows-10`. To do this, we will leverage the pre-built binaries posted on the [releases page](https://github.com/plusk01/teensyimu/releases).\n\nUnder the desired release version, expand the **Assets** list. Then, right-click the appropriate `*.tar.gz` link and copy the link address. You can simply direct `pip` to install the package at the URL. For example, using release version 0.1 on macos you would run:\n\n```bash\n$ pip install https://github.com/plusk01/teensyimu/releases/download/0.1/teensyimu-py3-macos-0.1.tar.gz\n```\n\nOnce installed, the installation can be verified with `python -m teensyimu.plotimu`. If the device is not plugged in, you should see a message (`Could not find Teensy!`) and the script should quit gracefully. If the device is plugged in data should apppear in the terminal and a plot should open.\n\n***Note**: If the latest version is desired (check [here](https://github.com/plusk01/teensyimu/blob/main/CMakeLists.txt#L2)) and there is not a release matching this version, then this package needs to be built from source (see below, e.g., Linux / MacOS, and then follow \"Installing Python Package from Source\").*\n\n### Building from Source\n\n\u003cdetails\u003e\n  \u003csummary\u003eLinux / MacOS\u003c/summary\u003e\n\nAfter cloning this project onto your computer:\n\n1. Build C++ driver with Python bindings (requires Boost):\n  \n  ```bash\n  mkdir build\n  cd build\n  cmake ..\n  make\n  ```\n  \nOnce the package builds successfully, you can install the `teensyimu` Python package as described below.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eWindows\u003c/summary\u003e\n\nCompilation of this package has been tested on a Windows 10 machine. The environment was setup as follows. Explicit versions used are listed, but these steps are expected to work with reasonably recent versions of these tools.\n\n1. Install [git bash](https://git-scm.com/downloads) (*2.30.1*)\n2. Install [CMake](https://cmake.org/download/) (*3.19.5*)\n3. Install [Python](https://www.python.org/) (*3.9.1*)\n4. Install [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/) or Professional (*Pro 2019, v16.8.5* with *MSVC 14.28.29333*)\n5. Install [Boost](https://sourceforge.net/projects/boost/files/boost-binaries) (*1.75.0*, [`boost_1_75_0-msvc-14.2-64.exe`](https://sourceforge.net/projects/boost/files/boost-binaries/1.75.0/))\n\nOnce the development environment is setup, use `git bash` (or `cmd`) to run the following commands\n\n```bash\n$ git clone https://github.com/plusk01/teensyimu # clone this repo in your preferred directory\n$ cd teensyimu\n$ mkdir build\n$ cd build\n$ cmake -DBUILD_SHARED_LIBS=OFF ..\n$ cmake --build . --target ALL_BUILD --config Release # or open in VS: start teensyimu.sln\n$ cmake --build . --target pypkg --config Release # to tar python pkg\n```\n\nOnce the package builds successfully, you can install the `teensyimu` Python package as described below.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eInstalling Python Package from Source\u003c/summary\u003e\n\nInstall the built-from-source Python package with `pip`:\n\n```bash\ncd build\nmake pip-install\n```\n\n\u003c/details\u003e\n\n## Setting up the Teensy firmware\n\nFlash Teensy with `firmware/firmware.ino` sketch.\n\n## Examples\n\nSee an IMU data plot in real-time with `python -m teensyimu.plotimu`. Alternatively, you can see the frequency spectrum with `python -m teensyimu.plotfreq`\n\n## Creating New Messages\n\nTo create new or change existing messages, changes need to be made in `teensyimu_serial.h` and in `serial_driver.cpp`. For these changes to appear in Python, `py_teensyimu.cpp` also needs to be changed. For an example of necessary changes, see [this commit](https://github.com/plusk01/teensyimu/commit/2f2101865d4a2deb641b958747ef80e209a2884f) where two new messages (*IMU_NoMag* and *IMU_3DOF*) were added.\n\nIf messages are changed, this project must be built from source.\n\n## Coordinate Frame\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/wiki/plusk01/teensyimu/assets/teensycoords.png\" width=\"70%\" /\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusk01%2Fteensyimu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplusk01%2Fteensyimu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplusk01%2Fteensyimu/lists"}