Chapter 1: Introduction to Hardware and Programming


In this unit, we will enter the world of electronics and programming and explore how to control hardware through code. Starting with the example program, Blink, we will learn how to light up an LED, turn the light on and off through a button, control the sound of a passive buzzer, and so on. In each task, we will master commonly used programming languages, such as digital input/output, analog input/output, tone and map functions, etc., and learn the primary usage of libraries. The programs in this unit are relatively simple. During the learning process, write the program code for each task by hand, develop good habits, and avoid program upload failures due to errors in symbols or unfamiliar rules.