{"id":24100091,"url":"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor","last_synced_at":"2025-05-07T22:26:20.481Z","repository":{"id":41287115,"uuid":"316332489","full_name":"alvarowolfx/tinyml-smart-tennis-sensor","owner":"alvarowolfx","description":"Run Machine learning on a microcontroller with an accelerometer sensor to classify different moves with the racket - Forehand, Backhand, Serve, and Idle.","archived":false,"fork":false,"pushed_at":"2020-11-26T20:44:45.000Z","size":12069,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T14:57:32.004Z","etag":null,"topics":["edge-impulse","tinyml"],"latest_commit_sha":null,"homepage":"","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/alvarowolfx.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}},"created_at":"2020-11-26T20:39:36.000Z","updated_at":"2024-07-25T05:41:18.000Z","dependencies_parsed_at":"2022-07-07T05:31:56.705Z","dependency_job_id":null,"html_url":"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor","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/alvarowolfx%2Ftinyml-smart-tennis-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarowolfx%2Ftinyml-smart-tennis-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarowolfx%2Ftinyml-smart-tennis-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarowolfx%2Ftinyml-smart-tennis-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarowolfx","download_url":"https://codeload.github.com/alvarowolfx/tinyml-smart-tennis-sensor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252963624,"owners_count":21832539,"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":["edge-impulse","tinyml"],"created_at":"2025-01-10T15:57:38.652Z","updated_at":"2025-05-07T22:26:20.460Z","avatar_url":"https://github.com/alvarowolfx.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TinyML Smart Tennis Racket\n\nRun Machine learning on a micro controller with an accelerometer sensor to classify different moves with the racket - Forehand, Backhand, Serve and Idle.\n\nData is collected using the `tinyml-tennis-collector` firmware, that sends data over BLE and there is a Web UI on `web-bluetooth-bridge-ui` folder that relays the data to [Edge Impulse](https://edgeimpulse.com).\n\nDemo video of the collecting data:\n\n- [Link on Twitter](https://twitter.com/alvaroviebrantz/status/1318211437681135616)\n\nThe model was trained on Edge Impulse and exported to be used on the `tinyml-tennis-classifier` firmware, that them shows a different LED color depending on the class - idle (red), forehand(green), backhand(blue)\n\nDemo video of the classification:\n\n- [Link on Twitter](https://twitter.com/alvaroviebrantz/status/1320463069575847936)\n\n️ ⚠️️️️**THIS IS A WORK IN PROGRESS** ⚠️\n\n\u003cimg src=\"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor/raw/main/images/particle-xenon-sensor.jpeg\" width=\"20%\" height=\"20%\" /\u003e \u003cimg src=\"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor/raw/main/images/dongle-racket.jpeg\" width=\"20%\" height=\"20%\" /\u003e \u003cimg src=\"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor/raw/main/images/dongle-front.jpeg\" width=\"20%\" height=\"20%\" /\u003e \u003cimg src=\"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor/raw/main/images/dongle-battery.jpeg\" width=\"20%\" height=\"20%\" /\u003e\n\u003cimg src=\"https://github.com/alvarowolfx/tinyml-smart-tennis-sensor/raw/main/images/dongle-back.jpeg\" width=\"20%\" height=\"20%\" /\u003e\n![Web UI](./images/web-ui.png)\n\n### TODO\n\n- Collect more data and with different people\n- Collect `Serve` data\n- Make data available for others to use\n\n## Bom - Bill of Material\n\n- Particle Xenon and/or nRF52840 Dongle\n  - I installed the [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader)\n  - I used the Particle Debugger and openocd to flash the bootloader.\n- MPU 6500 Accelerometer Module\n\n## Upload firmware with PlatformIO\n\nI recommend installing the Visual Studio Code (VSCode) IDE and the PlatformIO plugin to get started using it. Just follow the step on the link below:\n\nhttps://platformio.org/platformio-ide\n\nTo deploy to the board, just open the `tinyml-tennis-classifer` or `tinyml-tennis-collector` folder and you can use the “Build” and “Upload” buttons on PlatformIO Toolbar. All libraries and dependencies will be downloaded.\n\n## Web Interface with Bluetooth\n\nYou need to generate an API Key/Secret pair to send data to Edge Impulse.\n\n- Run on the command line:\n\n```\ncd web-bluetooth-bridge-ui\nnpm install\nnpm start\n```\n\n### References\n\n- https://www.tensorflow.org/lite/microcontrollers\n- https://blog.arduino.cc/2019/10/15/get-started-with-machine-learning-on-arduino/\n- https://medium.com/@devdevcharlie/play-street-fighter-with-body-movements-using-arduino-and-tensorflow-js-6b0e4734e118\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarowolfx%2Ftinyml-smart-tennis-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarowolfx%2Ftinyml-smart-tennis-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarowolfx%2Ftinyml-smart-tennis-sensor/lists"}