Ads

Arduino Machine Learning Tutorial: Introduction to TinyML with Wio Terminal

Learn TinyML with Arduino and Wio Terminal: gesture recognition, data gathering, model training, and edge deployment on microcontrollers.

⏱ 26min 👁 15,051 views 📅 January 19, 2021

More from this course

Free Edge AI and On-Device AI Course

Lesson 3 of 10

Summary

Understanding TinyML on Microcontrollers

TinyML represents a paradigm shift in embedded systems development, enabling machine learning models to run directly on resource-constrained devices like microcontrollers. The Arduino ecosystem, combined with the Wio Terminal's advanced hardware capabilities, provides an accessible entry point for developers interested in bringing intelligent features to edge devices. Unlike cloud-based machine learning approaches that require constant internet connectivity, TinyML models execute locally, reducing latency, improving privacy, and enabling offline functionality. This introductory course demonstrates how to leverage the Arduino IDE and Edge Impulse platform to build practical ML applications on the Wio Terminal, a powerful development board equipped with sensors and sufficient computational resources for real-world gesture recognition tasks.

Why TinyML Matters for Edge Computing

The rationale behind TinyML extends beyond mere technical curiosity. Embedded systems powered by machine learning can perform complex tasks such as gesture recognition, anomaly detection, and sensor data classification without depending on external servers. This approach significantly reduces bandwidth requirements, improves response times, and enables deployment in environments where connectivity is unreliable or unavailable. Industries ranging from IoT and robotics to industrial automation increasingly rely on edge ML to process streaming sensor data intelligently. The Wio Terminal exemplifies this trend by combining multiple built-in sensors, wireless connectivity, and ARM Cortex-M processor capabilities into a compact form factor suitable for prototyping and production-grade applications.

The Wio Terminal: Hardware Capabilities and Specifications

The Wio Terminal is a compact development board designed specifically for IoT and edge computing applications. It features a dual-core ARM Cortex-M4F processor, 4MB of RAM, and 2MB of flash memory—sufficient for deploying quantized machine learning models. The board includes built-in light sensors, motion sensors, and wireless modules (WiFi and Bluetooth), making it ideal for multi-sensor fusion applications. Its integrated display and buttons allow for rapid prototyping of user-facing applications without requiring external peripherals. The Wio Terminal's design philosophy emphasizes accessibility for developers without requiring extensive embedded systems expertise, while maintaining the performance characteristics necessary for real-world deployments. Its compatibility with the Arduino IDE ecosystem further lowers the barrier to entry for TinyML development.

Software Environment and Development Workflow

The tutorial establishes the foundational software stack required for TinyML development on the Wio Terminal. The Arduino IDE serves as the primary development interface, providing a familiar environment for code compilation and device flashing. Edge Impulse, an online platform specialized in TinyML, handles the critical phases of data collection, feature engineering, model training, and conversion of trained models into deployable firmware. This separation of concerns—where data science tasks occur on the cloud platform while deployment happens locally—streamlines the development workflow. Developers configure their Wio Terminal within the Arduino IDE, install necessary libraries, and establish communication channels between the device and Edge Impulse's data collection tools. Understanding this workflow establishes the technical foundation necessary for subsequent practical exercises.

Data Gathering and Feature Extraction Strategies

Successful machine learning projects depend fundamentally on high-quality training data. The tutorial demonstrates how to use Edge Impulse's data forwarder tool to systematically collect sensor readings from the Wio Terminal's light sensor. The data gathering phase involves recording multiple examples of the target gesture or behavior under varying environmental conditions, establishing a representative dataset. Raw sensor data from light intensity measurements requires preprocessing through data processing blocks within Edge Impulse, which apply filtering, normalization, and feature extraction techniques. These preprocessing steps transform raw time-series sensor values into meaningful features that machine learning algorithms can effectively learn from. The quality and diversity of gathered data directly influence model performance, making this phase critical for developing reliable gesture recognition systems that generalize beyond training conditions.

Learning Blocks and Model Training Process

Once data processing is complete, learning blocks implement the actual machine learning training algorithms. Edge Impulse provides specialized learning blocks optimized for embedded deployment, balancing model accuracy against computational constraints. For gesture recognition tasks on the Wio Terminal, the platform typically employs techniques such as neural network classification tailored for small memory footprints. During training, the learning algorithm adjusts model parameters to minimize prediction error on the processed features, using validation data to assess generalization performance. The tutorial illustrates how hyperparameters affect training dynamics and how model performance metrics guide decisions about architecture adjustments or data collection refinements. Understanding this iterative loop—gathering data, processing features, training models, evaluating results—forms the conceptual core of practical machine learning development.

Deployment and On-Device Testing Procedures

The final stages of the workflow transition the trained model from the cloud platform back to the Wio Terminal as compiled firmware. Edge Impulse generates optimized C++ code and Arduino libraries that encapsulate the entire inference pipeline, reducing deployment complexity to a simple library import. Developers flash this updated firmware to the device using the Arduino IDE, establishing a complete machine learning application running entirely on the microcontroller. The testing phase involves interacting with the device using the trained gestures while observing inference results through serial output or the board's integrated display. This hands-on validation confirms that the model performs reliably in real-world conditions and guides any necessary refinement iterations. The entire deployment-to-testing cycle typically requires only minutes, enabling rapid experimentation and iteration.

Practical Applications and Next Steps

The gesture recognition system demonstrated in this course represents just one category of TinyML applications. The same methodology applies to sensor-based anomaly detection, audio classification, vibration analysis, and countless other use cases. Real-world projects extending this foundation might incorporate multiple sensor modalities, implement more sophisticated gesture vocabularies, or deploy to production environments. The Artificial Nose project referenced in the course materials exemplifies how TinyML enables specialized sensing applications by training models to distinguish chemical signatures. As developers progress beyond introductory projects, exploring advanced topics such as model quantization, knowledge distillation, and resource profiling becomes increasingly valuable for optimizing performance on constrained devices.

Building Towards Production-Ready Systems

The tutorial establishes essential concepts and practical skills, yet moving from prototype to production requires additional considerations around model robustness, power consumption optimization, and integration with larger systems. Understanding the tradeoffs between model accuracy and inference latency on constrained hardware becomes increasingly important in production contexts. Developers should familiarize themselves with techniques for stress-testing models under diverse environmental conditions, implementing fallback behaviors when confidence scores are low, and monitoring device performance metrics over extended operation periods. The Wio Terminal's wireless capabilities enable telemetry collection and over-the-air firmware updates, facilitating long-term maintenance of deployed systems. By mastering the foundational workflow presented in this introductory course, developers gain the knowledge necessary to build increasingly sophisticated machine learning applications on edge devices.

What you will learn

  • Understand TinyML fundamentals and edge machine learning principles
  • Configure the Wio Terminal hardware and Arduino IDE development environment
  • Collect and preprocess sensor data using Edge Impulse
  • Train machine learning models optimized for microcontroller deployment
  • Deploy trained models to devices and validate in-device inference performance

Concepts covered

Technologies used

Chapters 10 markers

  1. Intro
  2. Why TinyML?
  3. About Wio Terminal
  4. Software overview
  5. Preparing the environment
  6. Gathering the data with data forwarder
  7. Data processing blocks
  8. Learning blocks
  9. Deployment to device
  10. Testing on device

Next suggested video

Reviews

Student rating 0.0
0 reviews
Rate this lesson

Help other students decide if this lesson is useful.

No reviews yet. Be the first to rate this lesson.