Chapter 2: Prototyping with Microcontrollers
Deploying machine learning (ML) applications on microcontrollers is cool because what we develop doesn't just live within our computer's brain. Instead, it can animate many things around us. Therefore, before diving into the ML world, let's take a glance at how to build basic applications on microcontrollers from a software and hardware perspective.
In this chapter, we will deal with code-debugging and present how to transmit data to the Arduino serial monitor. Next, we will discover how to program GPIO peripherals with the Arm Mbed API and use the solderless breadboard to connect external components such as LEDs and push-buttons. At the end of the chapter, we will see how to power the Arduino Nano and Raspberry Pi Pico with batteries.
The aim of this chapter is to cover the relevant microcontroller programming basics for the following topics in this book.
In this chapter, we're going to cover the following recipes:
- Code debugging 101
- Implementing an LED status indicator on the breadboard
- Controlling an external LED with the GPIO
- Turning an LED on and off with a ush-button
- Using interrupts to read the push-button state
- Powering microcontrollers with batteries