Comprehensive Guide to 80 MCU Programming Examples (1-30)

Comprehensive Guide to 80 MCU Programming Examples (1-30)

Please click above for free follow… *Example 1: Use P3 port to light up 8 LEDs in sequence #include<reg51.h>//Include the header file for MCU registers / Function: Delay for a period of time void delay(void) { unsigned char i,j; for(i=0;i<250;i++) for(j=0;j<250;j++) ; } / Function: Main function void main(void) { while(1) { P3=0xfe; // First … Read more

Comprehensive Guide to 80 Microcontroller Programming Examples

Comprehensive Guide to 80 Microcontroller Programming Examples

*Example 1: Use P3 port to light up 8 LEDs in sequence #include<reg51.h> // Include microcontroller register header file / Function: Delay for a certain period of time void delay(void) { unsigned char i,j; for(i=0;i<250;i++) for(j=0;j<250;j++) ; } / Function: Main function void main(void) { while(1) { P3=0xfe; // First light on delay(); // Call … Read more

Embedded Linux Driver Development: LED Control

Embedded Linux Driver Development: LED Control

Abstract: Yesterday, I introduced the method of lighting up an LED using bare metal programming. Today, we will light up an LED using driver development to see the differences between the two methods. 1. Let’s Look at the Schematic First, let’s check the schematic to see which IO port the LED on our board is … Read more

Design of LED Neon Light Controller Based on 51 Microcontroller

Design of LED Neon Light Controller Based on 51 Microcontroller

Design of LED Neon Light Controller Based on 51 Microcontroller (Heart-Shaped Flowing Light) Development Environment Simulation Software: Proteus 8.9 or above Program Code: KEIL4/KEIL5 Schematic: AD Design Number: A0005 Function Description Based on the actual situation, design an LED neon light controller using the 51 microcontroller. The system must meet the following functional requirements: Specific … Read more

Arduino Serial Communication Example

Arduino Serial Communication Example

Of course, below I will provide a complete example of Arduino serial communication. This example will demonstrate how to perform simple data exchange between Arduino and a computer. We will write a program that receives characters from the computer and performs different actions based on the received characters. At the same time, Arduino will also … Read more

Introduction to Hardware Control with Python: Controlling Raspberry Pi Hardware with RPi.GPIO

Introduction to Hardware Control with Python: Controlling Raspberry Pi Hardware with RPi.GPIO

The Raspberry Pi is a microcomputer that can interact with various electronic components through GPIO pins. Today we will learn how to use Python’s RPi.GPIO module to control these GPIO pins for hardware control. Whether you want to create smart home devices or DIY electronic projects, this is a very practical lesson. First, you need … Read more

Mastering Arduino Programming with Pyfirmata: A Python Library for Easy Hardware Control

Mastering Arduino Programming with Pyfirmata: A Python Library for Easy Hardware Control

Pyfirmata – Making Arduino Programming Incredibly Simple! Hello everyone! Today, I want to introduce you to a super useful Python library – Pyfirmata! 😎 I still remember the first time I played with Arduino, I was overwhelmed by the C++ code. Why did I have to write so much complex code just to make an … Read more

FreeRTOS Operating System: A Comprehensive Guide

FreeRTOS Operating System: A Comprehensive Guide

The manual porting process is complex and tedious. First, use cubemx for quick configuration: First, print a message to the serial port: /* USER CODE BEGIN 2 */ printf("hello shxi\r\n"); /* USER CODE END 2 */ /* Call init function for freertos objects (in freertos.c) */ MX_FREERTOS_Init(); OK proves that the configuration is correct! Tasks … Read more

Getting Started with FastLED: A Powerful LED Control Library for Arduino

Getting Started with FastLED: A Powerful LED Control Library for Arduino

FastLED is an Arduino library for efficiently controlling various LED strips, renowned for its ease of use, high performance, and broad compatibility. Whether you are a beginner or an experienced user, FastLED helps you easily achieve stunning lighting effects. This article will delve into the features, usage methods, and some advanced techniques of the FastLED … Read more