Skip to content

Commit aebe203

Browse files
committed
[example][hello world] update readme
1 parent a149f04 commit aebe203

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

examples/hello_world/README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ microcontroller.
1111
The model is trained to replicate a `sine` function and generates a pattern of
1212
data to blink the built-in LED in a fade in/out pattern.
1313

14-
## Table of contents
15-
<!--ts-->
16-
* [Table of contents](#table-of-contents)
17-
* [Deploy to Arduino](#deploy-to-arduino)
18-
* [Install the Arduino_TensorFlowLite library](#install-the-arduino_tensorflowlite-library)
19-
* [Load and run the example](#load-and-run-the-example)
20-
<!--te-->
21-
2214
## Deploy to Arduino
2315

2416
The following instructions will help you build and deploy this sample
@@ -35,25 +27,35 @@ built-in LED as the one being controlled. However, on some boards, this built-in
3527
LED is not attached to a pin with PWM capabilities. In this case, the LED will
3628
blink instead of fading.
3729

30+
You can modify the LED pin number in `arduino_output_handler.cpp` file to adjust to
31+
a pin which can generate the PWM.
32+
3833
![Animation on Nano 33 BLE Sense](../../docs/hello_world_animation.gif)
3934

40-
### Install the Arduino_TensorFlowLite library
35+
### Install the TensorFlow Lite Micro library
4136

42-
To install the TensorFlow Lite Micro for Arduino library, see the
43-
[how to install](../../README.md#how-to-install) instructions.
37+
In the menuconfig:
4438

45-
### Load and run the example
39+
- Enable TensorFlow Lite Micro
40+
- Enable hello world example
4641

47-
Once the library has been added, go to `File -> Examples`. You should see an
48-
entry within the list named `Arduino_TensorFlowLite`. Select
49-
it and click `hello_world` to load the example.
42+
```Kconfig
43+
RT-Thread online packages --->
44+
Arduino libraries --->
45+
Data Processing --->
46+
[*] TensorFlow Lite Micro: TensorFlow Lite for Microcontrollers (TLFM) Library for RTduino --->
47+
Examples --->
48+
[*] Enable hello world example
49+
```
5050

51-
Use the Arduino IDE to build and upload the example. Once it is running,
52-
you should see the built-in LED on your device flashing.
51+
### Load and run the example
5352

54-
The Arduino Desktop IDE includes a plotter that we can use to display the sine
55-
wave graphically. To view it, go to `Tools -> Serial Plotter`. You will see one
56-
datapoint being logged for each inference cycle, expressed as a number between 0
57-
and 255.
53+
Once you select `Enable hello world example`, after compiling, the hello world example will automatically run, and you will see the LED is changing. Meanwhile, the serial also will print a sine wave time series number.
5854

5955
![Serial Plotter with Nano 33 BLE Sense](../../docs/hello_world_serial_plotter.png)
56+
57+
### Reference
58+
59+
- https://www.tensorflow.org/lite/microcontrollers/get_started_low_level
60+
- https://www.youtube.com/watch?v=BzzqYNYOcWc
61+
- https://www.youtube.com/watch?v=8N6-WQsxwxA&list=PLtT1eAdRePYoovXJcDkV9RdabZ33H6Di0&index=2

0 commit comments

Comments
 (0)