All Projects → googlecreativelab → tf4micro-motion-kit

googlecreativelab / tf4micro-motion-kit

Licence: Apache-2.0 License
Arduino Sketch and a Web Bluetooth API for loading models and running inference on the Nano Sense 33 BLE device.

Programming Languages

C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to tf4micro-motion-kit

chirp8-avr
CHIP-8 implementation in Rust targeting AVR microcontrollers
Stars: ✭ 40 (-2.44%)
Mutual labels:  microcontroller
Great-Cow-BASIC-Demonstration-Sources
Demonstration files for Great Cow BASIC - a compiler for Microchip and AVR 8-bit microcontrollers
Stars: ✭ 18 (-56.1%)
Mutual labels:  microcontroller
usb
Minimalist portable USB device stack for SAMD21, LPC1800, LPC4300, Xmega
Stars: ✭ 90 (+119.51%)
Mutual labels:  microcontroller
json-maker
C library used to code JSON objects in null-terminated strings
Stars: ✭ 55 (+34.15%)
Mutual labels:  microcontroller
micropython-iot-tutorial
Source code for the "MicroPython and the Internet of Things" tutorial by Miguel Grinberg
Stars: ✭ 21 (-48.78%)
Mutual labels:  microcontroller
rnk
rnk is a RTOS targeting ARM architecture.
Stars: ✭ 22 (-46.34%)
Mutual labels:  microcontroller
smartsilo
Hardware-integrated system composed by a desktop app and a Node.js server able to control an Arduino and manipulate the temperature of grains within storage silos
Stars: ✭ 33 (-19.51%)
Mutual labels:  microcontroller
AES
AES for microcontrollers (Arduino & Raspberry pi)
Stars: ✭ 116 (+182.93%)
Mutual labels:  microcontroller
lwprintf
Lightweight printf library optimized for embedded systems
Stars: ✭ 98 (+139.02%)
Mutual labels:  microcontroller
m3forth
m3forth is a forth cross-compiler for cortex-m3 ARM microcontrollers
Stars: ✭ 16 (-60.98%)
Mutual labels:  microcontroller
Python-For-Kids
A comprehensive and FREE Online Python Development tutorial FOR KIDS utilizing an official BBC micro:bit Development Board going step-by-step into the world of Python for microcontrollers.
Stars: ✭ 621 (+1414.63%)
Mutual labels:  microcontroller
embLua
Lua for microcontrollers
Stars: ✭ 23 (-43.9%)
Mutual labels:  microcontroller
PIC18F4550-TUTORIAL
PIC18F4550 - TUTORIAL
Stars: ✭ 31 (-24.39%)
Mutual labels:  microcontroller
mdepx
MDEPX — A BSD-style RTOS
Stars: ✭ 17 (-58.54%)
Mutual labels:  microcontroller
embeddedml
No description or website provided.
Stars: ✭ 103 (+151.22%)
Mutual labels:  microcontroller
air-snare
Play drums in the air.
Stars: ✭ 32 (-21.95%)
Mutual labels:  microcontroller
ArduinoSpritzCipher
Spritz encryption system portable C library, CSPRNG, cryptographic hash and MAC functions, symmetric-key data encryption, and general-purpose functions. It's also an Arduino library.
Stars: ✭ 67 (+63.41%)
Mutual labels:  microcontroller
m-microcontroller
Factorio mod: program circuit network logic using FAL, a Factorio Assembly Language.
Stars: ✭ 13 (-68.29%)
Mutual labels:  microcontroller
zevoicemask
An open source DIY implemetation of a face mask with voice visuals and animations.
Stars: ✭ 13 (-68.29%)
Mutual labels:  microcontroller
BioBalanceDetector
Bio Balance Detector's products aim to show the weak electromagnetic fields around every living being (including plants, animals and humans) and display it in a heat-map like hyper-spectral image.
Stars: ✭ 18 (-56.1%)
Mutual labels:  microcontroller

TF4Micro Motion Kit

This repo contains the Arduino Sketch and a Web Bluetooth API for loading models and running inference on the device.

Install and Run on Arduino

Flashing: Using the Arduino Nano Sense 33 BLE

  1. Install the Arduino IDE

  2. Setup Arduino board:

  • Plug in the board

  • Install the board by navigating to Tools > Board > Boards Manager and search for Arduino Mbed OS Nano Boards. Full instructions (including drivers required for Windows) here.

  • FAQ for connection problems can be found here.

  • After the board is installed, select it under to Tools > Board > Arduino Mbed OS Nano Boards > Arduino Nano 33 BLE Arduino board

  • Select the port by navigating to Tools -> Port -> dev/cu... (Arduino Nano 33 BLE) Arduino Port

  1. Install Arduino libraries
  • Navigate to Tools > Manage Libraries
  • Search for and install:
  • Arduino_LSM9DS1
  • ArduinoBLE
  • Arduino_TensorFlowLite Manage libraries TensorFlow Lite Library
  1. Open the sketch and flash
  • Download the latest release here

  • Open the arduino/tf4micro-motion-kit and double click on <tf4micro-motion-kit.ino> file

  • Click the Right arrow in the top left corner to build and upload the sketch.
    Arduino Port

  • Warning: This process may take a few minutes. Also, warnings may populate but the upload should still succeed in spite of them.

  • If the sketch is installed, the LED on the board should flash red and green.

  1. Go to the URL related to the experiment. The URL can be found below and play!

Using the TensorFlow Lite for Microcontrollers Kit by SparkFun

The board that comes with the TensorFlow Lite for Microcontrollers Kit by SparkFun comes preflashed with a sketch that will work with some of the experiments right out of the box. If you are using one of the “TensorFlow Lite for Microcontrollers” kits and you just want to jump right into playing with the experiments then you can simply connect your arduino to a power source (USB or Battery) and connect to one of the following experiment URLs:


Web API Usage

Either use the button.js module to create a button that will connect and transfer your model togheter with your setting to the arduino over BLE.

Example:

import connectButton from "./tf4micro-motion-kit/web/button";

function handleGesture({index, value, velocity}){
   console.log(index, value, velocity);
}

function handleTransferProgress(progress){
  console.log(`Loaded ${Math.round(progress * 100)}%`);
}

connectButton(containerElement, {
   model: "./model.tflite",
   numClasses: 4,
   threshold: 0.169,
   numSamples: 10,
   captureDelay: 125,
   onGesture: handleGesture,
   onTransferProgress: handleTransferProgress,
   useMagnetometer: true
 }).addEventListener("click", () => {
   soundManager.userInit();
 });

or

Use the full api module (either by importing index.js or whatever functions you need from api.js).

Run Test Pages:

  1. Build and upload the Sketch in the arduino folder to your BLE 33 Nano Sense
  2. Run:
    • $ cd web
    • $ sh serv.sh

You need live-server, python2 or 3 installed

Then go to localhost:9090 in your browser and follow instructions


Note

This 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.

We 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.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].