Nhảy đến:
Lesson 1/1: What is Arduino? Types of Arduino Boards and SunFounder Kit Lesson 2/31: Getting Arduino Software and using Documentation for SunFounder Arduino Kit Bài 3/31: Dự án LED Blink, Breadboard là gì, LED và Điện trở sử dụng bộ kit SunFounder Lesson 4/31: What are Binary, Decimal, Hexadecimal and Octal Number, Arduino Serial Monitor Lesson 5/31: Introduction to Arduino Data Types SunFounder Learning Kit Lesson 6/31: Buzzer, Driver Wheel and mini Water Pump using Arduino SunFounder Kit | Robojax Lesson 7/31: Digital Read Push button, detecting magnetic field SunFounder Kit | Robojax Lesson 8/31 : AnalogWrite LED Fade, for loop, while loop and do while loops | SunFounder Robojax Lesson 9/31: Reading Voltage Using Arduino, Potentiometer AnalogRead SunFounder Kit | Robojax Lesson 10/31: Conditional Statement in Arduino and Using Array | SunFounder Robojax Lesson 11/31: What is Arduino library and How to use DHT11 Temperature and Humidity Sensor | SunFounder Lesson 12/31: Using Arduino Programming function and switch | SunFounder Robojax Lesson 13/31: Using XY Joystick with Arduino and turning a buzzer with joystick Motion | Robojax Lesson 14/31: Arduino Millis (no delay) and map functions | SunFounder Robojax Lesson 15/31: Using Soil Moisture Sensor with Arduino SunFounder Kit | Robojax Lesson 16/31: Detecting Obstacle Using Infrared Obstacle Avoidance Sensor using SunFounder Kit Lesson 17/31: How to interrupt a delay in Arduino and Light Dependant Resistor LDR | Robojax Lesson 18/31: Using Servo Motor with Arduino SunFounder's Arduino Kit Lesson 19/31: Measure Distance Using Ultrasonic Sensor with Arduino | SunFounder Robojax Lesson 20/31: Using LCD1602 with Arduino display temperature, voltage and distance | Robojax Lesson 21/31: Using Infrared Remote Control with Arduino | SunFounder Robojax Bài 22/31: Sử dụng Màn hình Hiển thị Bảy Đoạn với Arduino và Xúc xắc Điện tử | SunFounder Robojax Bài 23/31: Xe Thông Minh Phần 1: Lắp Ráp Xe Thông Minh SunFounder và Giải Thích Cầu H Toàn Phần cho Động Cơ DC Bài 24/31: Xe thông minh Phần 2: Tiến, lùi, trái và phải cũng như điều khiển tốc độ của xe Bài 25/31: Xe thông minh Car-3 tránh chướng ngại vật bằng cảm biến hồng ngoại | SunFounder Robojax Bài 26/31: Xe Thông Minh Phần 4: Tránh Vật Cản Sử Dụng Cảm Biến Siêu Âm | SunFounder Robojax Bài 27/31: Xe thông minh SunFounder Car-5 đi theo tay bạn sử dụng Arduino | Robojax Bài 28/31: Xe tự lái SunFounder sử dụng Arduino | Robojax Bài 29/31: Xe-7 Điều khiển Xe thông minh SunFounder bằng Bộ điều khiển từ xa | Robojax Bài 30/31: Dò line Car-8 bằng Smart Car từ Bộ kit Arduino SunFounder | Robojax Bài 31/31: Đo Nhiệt Độ và Độ Ẩm qua Wi-Fi sử dụng DHT11 và ESP01 SunFounder Kit
Lesson 14/31: Arduino Millis (no delay) and map functions | SunFounder Robojax
Introduction
This lesson teaches two essential Arduino functions: millis() and map(). By the end of this tutorial, you will understand:
How to use millis() to manage timing without stopping program execution.
How to use map() to scale and control values, such as LED brightness or motor speed, based on percentages.
Part 1: Understanding millis()
The millis() function returns the number of milliseconds since the Arduino started running. It's crucial for creating non-blocking code where multiple tasks run simultaneously.
Why Use millis() Instead of delay()?
The delay() function pauses the entire program, preventing other code from running.
millis() lets you perform actions at specific intervals while the rest of your code continues executing.
Example: Blink LED Without delay()
Tài nguyên & tài liệu tham khảo Chưa có tài nguyên nào.
Tập tin📁
Thư viện Arduino (tệp nén)