{"id":20681528,"url":"https://github.com/googlecreativelab/astrowand","last_synced_at":"2025-07-11T06:35:10.964Z","repository":{"id":70992115,"uuid":"374744461","full_name":"googlecreativelab/astrowand","owner":"googlecreativelab","description":"Draw shapes in the sky to form constellations with TensorFlow and a microcontroller.","archived":false,"fork":false,"pushed_at":"2024-09-27T06:40:44.000Z","size":4524,"stargazers_count":19,"open_issues_count":4,"forks_count":6,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-22T12:12:10.707Z","etag":null,"topics":["arduino","microcontroller","tensorflow"],"latest_commit_sha":null,"homepage":"https://experiments.withgoogle.com/astrowand","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlecreativelab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2021-06-07T17:14:00.000Z","updated_at":"2024-08-25T23:27:08.000Z","dependencies_parsed_at":"2025-04-22T12:12:09.358Z","dependency_job_id":"50785987-9657-425b-99d7-c21843f4c983","html_url":"https://github.com/googlecreativelab/astrowand","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/googlecreativelab/astrowand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlecreativelab%2Fastrowand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlecreativelab%2Fastrowand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlecreativelab%2Fastrowand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlecreativelab%2Fastrowand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlecreativelab","download_url":"https://codeload.github.com/googlecreativelab/astrowand/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlecreativelab%2Fastrowand/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264747916,"owners_count":23657928,"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":["arduino","microcontroller","tensorflow"],"created_at":"2024-11-16T22:11:11.514Z","updated_at":"2025-07-11T06:35:10.944Z","avatar_url":"https://github.com/googlecreativelab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Astrowand\n\n## Overview\n\nSince 2009, coders have created thousands of experiments using Chrome, Android, AI, WebVR, AR and more. We showcase these projects and a variety of helpful tools and resources to inspire a diverse community of makers to explore, create, and share what’s possible with these technologies.\n\n**Astrowand** is a part of the TensorFlow Microcontroller Experiments, a collection of open source, interactive projects designed to demonstrate some fun ways to combine Arduino and TensorFlow Lite for Microcontrollers. \n\nThese projects were built with the \n[Arduino Sense 33 BLE](https://store.arduino.cc/usa/nano-33-ble-sense \"Arduino Store\"), [TensorFlow Lite for Microcontrollers](https://www.tensorflow.org/lite/microcontrollers \"TFL4M\"), standard web technologies (HTML, CSS \u0026 Javascript ) and [THREEJS](https://threejs.org/ \"three\").\n\n----\n\n## Experiment description\n [Astrowand](https://experiments.withgoogle.com/astrowand \"Astrowand Google Experiment\") lets you draw shapes in the sky to form constellations.\n\nOther experiments to explore:\n\n- [Air Snare](https://experiments.withgoogle.com/air-snare \"Air Snare Google Experiment\") lets you play the drums in the air.\n- [Finger User Interface](https://experiments.withgoogle.com/finger-user-interface \"FUI Google Experiment\") or FUI (pronounced Foo-ey) lets you control connected devices with the wave of a finger.\n- [Morning Mountain: Visual Alarm Clock](https://experiments.withgoogle.com/visual-alarm-clock \"Morning Mountain Google Experiment\") lets you stop your alarm clock from ringing by striking a pose.\n- [Tiny Motion Trainer](https://experiments.withgoogle.com/tiny-motion-trainer \"Tiny Motion Trainer\") lets you train and test IMU based TFLite models in the browser.\n\n----\n\n## Tools\n\n- Linux, MacOS or Windows computer with [Chrome](https://www.google.com/chrome/?brand=WHAR\u0026geo=US\u0026gclid=Cj0KCQjw9_mDBhCGARIsAN3PaFNRBCVUxmhR1QPA2LHaoELEr9yc1KkSNQ-Jc9KVZd8Sq2ux5gR6mJsaAm_6EALw_wcB\u0026gclsrc=aw.ds \"Chrome\") installed\n- TensorFlow Microcontroller Challenge Kit by Sparkfun or [Arduino Nano BLE Sense 33](https://store.arduino.cc/usa/nano-33-ble-sense \"Arduino Nano\")\n- [Micro USB](https://www.google.com/search?rlz=1C5CHFA_enUS858US858\u0026sxsrf=ALeKk01CbJTvQbYgX6arJbsjcRVmv-3-RQ:1584929968297\u0026q=Micro+USB+cable\u0026spell=1\u0026sa=X\u0026ved=2ahUKEwjl8IOexK_oAhXDqZ4KHZ0mCmcQBSgAegQIDhAn\u0026biw=1680\u0026bih=832 \"Micro USB\") cable (If you're on a USB-C laptop, instead get a [USB-C to Micro USB](https://www.google.com/search?\u0026q=USB-C+to+Micro+USB+cable \"USB-C to Micro USB\") cable)\n- Rubberband\n- Stick or wand\n- [Optional] Battery\n\n----\n\n## Install and Run\n\nFlashing: Using the Arduino Nano Sense 33 BLE\n\n1. Install the [Arduino IDE ](https://www.arduino.cc/en/software \"Arduino IDE\")\n\n\n2. Setup Arduino board:\n    -  Plug in the board\n    - Install the board by navigating to Tools \u003e Board \u003e Boards Manager and search for  Arduino Mbed OS Nano Boards. Full instructions (including drivers required for Windows) [here.](https://www.arduino.cc/en/Guide/NANO33BLESense/ \"Arduino Guide\")\n    - FAQ for connection problems can be found [here.](https://github.com/tinyMLx/appendix/blob/main/ArduinoFAQ.md \"Arduino Guide\") \n    - After the board is installed, select it under to Tools \u003e Board \u003e  Arduino Mbed OS Nano Boards \u003e Arduino Nano 33 BLE\n![Arduino board](/readme_images/board.png)\n\n    - Select the port by navigating to Tools -\u003e Port -\u003e dev/cu... (Arduino Nano 33 BLE)\n![Arduino Port](/readme_images/port.png)\n\n\n3. Install Arduino libraries \n    -  Navigate to Tools \u003e Manage Libraries\n    - Search for and install:\n    - Arduino_LSM9DS1\n    - ArduinoBLE\n    - Arduino_TensorFlowLite\n![Manage libraries](/readme_images/library.png)\n![TensorFlow Lite Library](/readme_images/tflib.png)\n\n4. Open the sketch and flash\n    - Download the  [Astrowand Arduino sketch file](https://experiments.withgoogle.com/astrowand/view/astrowand-arduino-sketch-v002.zip \"file\")\n    - Unzip the downloaded Astrowand file, open the **Arduino** \u003cfolder\u003e and double click on \u003castrowand.ino\u003e file\n    - Click the Right arrow in the top left corner to build and upload the sketch.  \n![Arduino Port](/readme_images/buttons.png)\n\n    - **Warning**: This process may take a few minutes. Also, warnings may populate but the upload should still succeed in spite of them.\n    - If the sketch is installed, the LED on the board should flash red and green. \n\n\n5. Go to the URL related to the experiment. The URL can be found below and play!\n    - [Astrowand](https://experiments.withgoogle.com/astrowand/view \"Astrowand\")\n\n----\n\n## FAQ \u0026 Common Errors\n\n**What exactly is being transferred when I “connect”?**\u003cbr/\u003e\nWhen you’re connecting the board to your computer, a pre-trained TensorFlow Lite machine learning model gets transferred over BLE onto the device.\n\n**What if I’m having issues connecting via bluetooth?**\u003cbr/\u003e\nIf you are having issues connecting try the following: \n1. Make sure your browser (Chrome or Edge) supports Bluetooth and it is enabled. . \n2. Make sure your device (laptop, phone, etc) supports Bluetooth and that it is working and enabled..\n3. Refresh the web page,unplug the Arduino power cable and then plug it back in to reset.  , then try connecting again.\n\n*NOTE: If you’re using a managed device, like a computer from school or work, your device policy may prevent BLE pairing.*\n\n**My board isn’t showing up on my computer, even though it’s plugged in. What should I do?**\u003cbr/\u003e\nTry unplugging the Arduino power cable and then plug it back in to reset. Make sure you see the RGB LED blink red, green, blue in a sequential order.\n\n**The model isn’t getting my movements right. What do I do?**\u003cbr/\u003e\nThe model isn’t getting my movements right. What do I do? With this experiment you need to follow the shapes as shown in the demo animations. Try to draw accurate shapes, at a relatively fast pace and don't make the shapes too oversized. If you look in the bottom right corner of the screen, you can see how accurate your drawings are, and perfect as needed.\n\n**Do you have plans to support other boards?**\u003cbr/\u003e\nWe made these projects to work specifically with the Arduino Nano, and we currently don’t have plans to expand support. However, all of the code is open sourced, so you can remix or modify as needed. \n\n**Where should I go from here if I want to make my own model or project?**\u003cbr/\u003e\nYou can create your own model in several different ways. Check out these links: \n\n- [Experiments Collection](https://experiments.withgoogle.com/ \"Experiments Collection\") - Inspiration and more resources\n- [Tiny Motion Trainer](https://experiments.withgoogle.com/tiny-motion-trainer/view \"Tiny Motion Trainer\") - Code-free motion trainer for microcontrollers\n- [Teachable Machine](https://teachablemachine.withgoogle.com/ \"Teachable Machine\") - Code-free image model trainer\n- [TensorFlow Lite for Microcontrollers](https://www.tensorflow.org/lite/microcontrollers \"TensorFlow Lite for Microcontrollers\") - Full documentation \n- [Free Harvard EdX Course](https://www.edx.org/professional-certificate/harvardx-tiny-machine-learning \"Harvard X Course\")  - In-depth course on TensorFlow Lite for Microcontrollers and the TinyML Ecosystem `\n\n**\"What sensors do the experiments use?\"**\u003cbr/\u003e\nThe IMU is a LSM9DS1. It is a 3-axis accelerometer, 3-axis gyroscope and 3-axis magnetometer. This chip, made by ST Microelectronics, is a standard component supported by our library ArduinoLSM9DS1. Read more here: https://www.arduino.cc/en/Guide/NANO33BLESense\n\n**How do you shrink a TensorFlow model to fit on a microcontroller?**\u003cbr/\u003e\nPost-training quantization is a conversion technique that can reduce model size while also improving CPU and hardware accelerator latency, with little degradation in model accuracy. You can quantize an already-trained float TensorFlow model when you convert it to TensorFlow Lite format using the TensorFlow Lite Converter. Read more here: https://www.tensorflow.org/lite/performance/post_training_quantization\n\n\n----\n\n## Note\n\nThis is not an official Google product, but a collection of experiments that were developed at the Google Creative Lab. This is not a library or code repository that intends to evolve. Instead, it is a snapshot alluding to what’s possible at this moment in time.\n\nWe encourage open sourcing projects as a way of learning from each other. Please respect our and other creators’ rights, including copyright and trademark rights when present, when sharing these works and creating derivative work. If you want more info on Google's policy, you can find that [here.](https://about.google/brand-resource-center/ \"Google Brand Resource Center\")\n\n----\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecreativelab%2Fastrowand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecreativelab%2Fastrowand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecreativelab%2Fastrowand/lists"}