Skip to Content
TinyML
book

TinyML

by Pete Warden, Daniel Situnayake
December 2019
Intermediate to advanced
504 pages
13h 3m
English
O'Reilly Media, Inc.
Content preview from TinyML

Appendix A. Using and Generating an Arduino Library Zip

The Arduino IDE requires source files to be packaged in a certain way. The TensorFlow Lite for Microcontrollers Makefile knows how to do this for you, and can generate a .zip file containing all the source, which you can import into the Arduino IDE as a library. This will allow you to build and deploy your application.

Instructions on generating this file appear later in this section. However, the easiest way to get started is to use a prebuilt .zip file that is generated nightly by the TensorFlow team.

After you’ve downloaded that file, you need to import it. In the Arduino IDE’s Sketch menu, select Include Library→Add .ZIP Library, as shown in Figure A-1.

Screenshot of the Add .ZIP Library menu option
Figure A-1. The “Add .ZIP library…” menu option

In the file browser that appears, locate the .zip file and click Choose to import it.

You might instead want to generate the library yourself—for example, if you made changes to the code in the TensorFlow Git repository that you’d like to test out in the Arduino environment.

If you need to generate the file yourself, open a terminal window, clone the TensorFlow repository, and change into its directory:

git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow

Now run the following script to generate the .zip file:

tensorflow/lite/micro/tools/ci_build/test_arduino.sh

The file will be created at the following location: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

INSPIRED

INSPIRED

Marty Cagan
Practical MLOps

Practical MLOps

Noah Gift, Alfredo Deza
Storytelling with You

Storytelling with You

Cole Nussbaumer Knaflic

Publisher Resources

ISBN: 9781492052036Errata Page