Skip to content

Commit 59479fb

Browse files
8bitkickcmaglie
authored andcommitted
Updated tutorial
1 parent 000ebe9 commit 59479fb

10 files changed

+23
-44
lines changed

GestureToEmoji/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Machine Learning on Arduino
22
## TensorFlow Lite gesture training tutorial
33

4-
In this tutorial we will teach a board to recognise gestures! We'll capture motion data from the [Arduino Nano 33 BLE Sense](https://store.arduino.cc/arduino-nano-33-ble-sense) board, import it into TensorFlow to train a model, and deploy inferencing onto the board using [TensorFlow Lite for microcontrollers](https://www.tensorflow.org/lite/microcontrollers/overview).
4+
In this tutorial we will teach a board to recognise gestures! We'll capture motion data from the [Arduino Nano 33 BLE Sense](https://store.arduino.cc/arduino-nano-33-ble-sense) board, import it into TensorFlow to train a model, and deploy a classifier onto the board using [TensorFlow Lite for microcontrollers](https://www.tensorflow.org/lite/microcontrollers/overview).
55

6-
Credits
6+
### Credits
77

88
This tutorial is adapted from the [workshop](https://github.com/sandeepmistry/aimldevfest-workshop-2019) Sandeep Mistry, Arduino and Don Coleman, Chariot Solutions presented at AI/ML Devfest in September 2019.
99

@@ -13,7 +13,7 @@ This tutorial is adapted from the [workshop](https://github.com/sandeepmistry/ai
1313
## Exercises
1414

1515
* [Exercise 1: Development Environment](exercises/exercise1.md)
16-
* [Exercise 2: Assemble the Hardware](exercises/exercise2.md)
16+
* [Exercise 2: Connecting the Board](exercises/exercise2.md)
1717
* [Exercise 3: Visualizing the IMU Data](exercises/exercise3.md)
1818
* [Exercise 4: Gather the Training Data](exercises/exercise4.md)
1919
* [Exercise 5: Machine Learning](exercises/exercise5.md)

GestureToEmoji/arduino_tinyml_workshop.ipynb

+6-10
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@
2121
"colab_type": "text"
2222
},
2323
"source": [
24-
"<a href=\"https://www.aimldevfest.com\"><img src=\"https://www.aimldevfest.com/files/2019/09/AI-ML-devfest-AZ-2019-horz.png\" width=200/></a>\n",
25-
"\n",
26-
"# TinyML on Arduino Workshop\n",
27-
"[AI/ML Devfest](https://aimldevfest.com) September 28, 2019\n",
28-
"\n",
29-
"\n",
24+
"<a href=\"https://www.arduino.cc/\"><img src=\"https://raw.githubusercontent.com/sandeepmistry/aimldevfest-workshop-2019/master/images/Arduino_logo_R_highquality.png\" width=200/></a>\n",
25+
"# Tiny ML on Arduino\n",
26+
"## Gesture recognition tutorial\n",
3027
" * Sandeep Mistry - Arduino\n",
3128
" * Don Coleman - Chariot Solutions\n",
29+
"\n",
3230
" \n",
33-
"https://github.com/sandeepmistry/aimldevfest-workshop-2019"
31+
"https://github.com/arduino/ArduinoTensorFlowLiteTutorials/"
3432
]
3533
},
3634
{
@@ -545,9 +543,7 @@
545543
"source": [
546544
"# Classifying IMU Data\n",
547545
"\n",
548-
"Now it's time to switch back to the instructions on Github and run our new model on the Arduino Nano 33 BLE Sense to classify the accelerometer and gyroscope data.\n",
549-
"\n",
550-
"[Exercise 6:Classifying IMU Data](https://github.com/sandeepmistry/aimldevfest-workshop-2019/blob/master/exercises/exercise6.md)"
546+
"Now it's time to switch back to the tutorial instructions and run our new model on the Arduino Nano 33 BLE Sense to classify the accelerometer and gyroscope data.\n"
551547
]
552548
}
553549
]

GestureToEmoji/exercises/exercise1.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,20 @@ Search for "Nano 33 BLE" and install the Arduino nRF528x Boards (Mbed OS) defini
1919
### Arduino Libraries
2020
Install the following Arduino libraries using the Library manager:
2121

22+
* TensorFlow Lite library (search for "Arduino_TensorFlowLite")
2223
* Arduino LSM9DS1 library (search for "Arduino_LSM9DS1")
2324

2425
Open the library manager using the menu _Tools -> Manage Libraries..._
2526

2627
![Arduino Library Manager Menu](../images/ManageLibraries.png)
2728

28-
Search for "Arduino_LSM9DS1". Click the row and press the +Install+ button to install the Arduino LSM9DS1 accelerometer, magnetometer, and gyroscope library.
29+
Search for "Arduino_TensorFlowLite". Click the row and press the __Install__ button to install TensorFlow Lite for Microcontrollers
2930

30-
![Arduino LSM9DS1 library](../images/library-arduinolsm9ds1.png)
31-
32-
The TensorFlow Lite library isn't available in the Arduino Library Manager yet.
31+
Search for "Arduino_LSM9DS1". Click the row and press the __Install__ button to install the Arduino LSM9DS1 accelerometer, magnetometer, and gyroscope library.
3332

34-
1. Download the zip file [tensorflow_lite.zip](https://storage.googleapis.com/tensorflow-nightly/github/tensorflow/tensorflow/lite/experimental/micro/tools/make/gen/arduino_x86_64/prj/tensorflow_lite.zip)
35-
2. Import downloaded library into the IDE using _Sketch -> Include Library -> Add .ZIP library ..._
36-
37-
![Importing Tensor Flow Lite Library from ZIP file](../images/AddZipLibrary.png)
33+
![Arduino LSM9DS1 library](../images/library-arduinolsm9ds1.png)
3834

39-
![Selecting Tensor Flow Lite ZIP file](../images/AddZipLibrary_2.png)
4035

4136
__Linux users__ may need to configure permissions so their user can access the serial port. See the [Getting Started Guide for Linux](https://www.arduino.cc/en/guide/linux) on the Arudino website for more information.
4237

43-
Next [Exercise 2: Assemble the Hardware](exercise2.md)
38+
Next [Exercise 2: Connecting the board](exercise2.md)

GestureToEmoji/exercises/exercise2.md

+6-18
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
1-
# Exercise 2: Assemble the Hardware
1+
# Exercise 2: Connecting the board
22

3-
1. Remove the Arduino Nano 33 BLE Sense board from the box
4-
1. Hold the Arduino with the USB connector toward the left
5-
1. Plug the Arduino into the bottom of the mini solderless breadboard
6-
1. You should see 4 rows of holes above the Arduino board
7-
1. Take the button and gently insert it into the breadboard
8-
1. The right side of the button should be in the ground pin, which is denoted by a white mark
9-
1. The left side of the button should be in pin D3. (The pin labels are on the bottom of the board, so match your setup with the picture below.)
103

11-
![Picture of assembled hardware](../images/assembled-hardware.jpg)
124

13-
## Get the Code
145

15-
Clone or download this [git repository](https://github.com/sandeepmistry/aimldevfest-workshop-2019/). If you're familiar with [git](https://git-scm.com), clone this repository, otherwise, click the [green button]((https://github.com/sandeepmistry/aimldevfest-workshop-2019/) to download a zip file with all the code.
6+
![Picture of assembled hardware](../images/ble-sense.jpg)
167

17-
![screenshot of the git repository](../images/download-repo.png)
188

19-
## Hardware Test
9+
## Unboxing and set up
2010

11+
1. Remove the Arduino Nano 33 BLE Sense board from the box
2112
1. Plug the micro USB cable into the board and your computer
22-
1. Open ArduinoSketches/HardwareTest/HardwareTest.ino in the Arduino IDE
13+
1. Open the Arduino IDE application on your computer
2314
1. Choose the board `Tools -> Board -> Arduino Nano 33 BLE`
2415
1. Choose the port `Tools -> Port -> COM5 (Arduino Nano 33 BLE)` Note that the actual port may be different on your computer
25-
1. Upload the code to the board `Sketch -> Upload`
26-
1. Press the button and the on-board LED will light up
27-
1. Release the button and the on-board LED will shut off
28-
1. Open the serial monitor `Tools -> Serial Monitor` to see debug messages
16+
2917

3018
## LSM9DS1 Examples (Optional)
3119

GestureToEmoji/exercises/exercise4.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
1. Press the reset button on the board
44
1. Open the Serial Monitor: `Tools -> Serial Monitor`
5-
1. Push the button, make a punch gesture with the board in your hand
5+
1. Make a punch gesture with the board in your hand - you should see the sensor data log in the Serial Monitor
66
1. Repeat 10 times to gather more data
77
1. Copy and paste the data from the serial output to new text file called `punch.csv` using your favorite text editor
88
1. Close the Serial Monitor
99
1. Press the reset button on the board
1010
1. Open the Serial Monitor: `Tools -> Serial Monitor`
11-
1. Push the button, flex
11+
1. Make a flex gesture with the board in your hand
1212
1. Repeat 10 times
1313
1. Copy and paste the serial output to new text file `flex.csv` using your favorite text editor
1414

GestureToEmoji/exercises/exercise5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ You can enable 3rd party cookies, or better yet, add an exception for `[*.]googl
1818

1919
Open the notebook in Colab.
2020

21-
https://colab.research.google.com/github/sandeepmistry/aimldevfest-workshop-2019/blob/master/arduino_tinyml_workshop.ipynb
21+
https://colab.research.google.com/github/arduino/ArduinoTensorFlowLiteTutorials/blob/master/GestureToEmoji/arduino_tinyml_workshop.ipynb
2222

2323
Next [Exercise 6: Classifying IMU Data](exercise6.md)
Binary file not shown.
-23.9 KB
Binary file not shown.
-357 KB
Binary file not shown.

GestureToEmoji/images/ble-sense.jpg

83.6 KB
Loading

0 commit comments

Comments
 (0)