ESP32 smart car+PS2 wireless remote control+Mecanum wheel+microPython

from machine import Pin,PWM from ps2 import PS2Controller import time import os # ############################################ # PS2 Remote Control # ############################################ ps2ctl = PS2Controller(di_pin_no=26, do_pin_no=27, cs_pin_no=14, clk_pin_no=12) ps2ctl.init() # ############################################ # Trolley wheel control # ############################################ pin1=PWM(Pin(19),freq=1000) #Left front red 1 pin2=PWM(Pin(18),freq=1000) pin3=PWM(Pin(5),freq=1000) #Left rear red 3 pin4=PWM(Pin(17),freq=1000) pin5=PWM(Pin(16),freq=1000) #right front black 5 pin6=PWM(Pin(4),freq=1000) pin7=PWM(Pin(0),freq=1000) #right […]

“MicroPython implements I2S support on microcontrollers: Detailed guide with complete Python example code

Part 1: Introduction to MicroPython and Microcontrollers 1. Introduction to MicroPython MicroPython is a streamlined, efficient, and fast implementation of Python 3, designed for microcontrollers and restricted environments. Compared to traditional Python, MicroPython is optimized to run on resource-constrained devices, meaning it can run on devices with only a few tens of KB of RAM […]

16-MicroPython+ESP32 implements HCSR04 ultrasonic ranging sensor control

(1) Experiment purpose This experiment aims to use the MicroPython programming language to control the ESP32 module to drive the HCSR04 ultrasonic ranging sensor using the timer interrupt method. (2) Experimental materials ESP32 module PC(Windows) USB data cable HCSR04 ultrasonic ranging sensor dupont line Among them, understand and understand the HCSR04 ultrasonic ranging sensor: The […]

20-MicroPython+ESP32 implements MQTT communication

(1) Experiment purpose This experiment aims to use the MicroPython programming language to control the ESP32 module to implement MQTT communication. MicroPython provides support for the MQTT (Message Queuing Telemetry Transport) protocol, making it easy to implement message passing and communication between devices in embedded systems and IoT applications. MQTT is a lightweight publish/subscribe messaging […]

ESP32-S3 builds micropython development environment, firmware compilation and burning

Brief description I got my hands on an ESP32-S3-DevKitC-1 development board officially launched by Espressif Systems, and found that the overall performance of ESP32-S3 has been significantly improved compared to the previous two generations, including wifi and Bluetooth functions, and more sufficient peripheral expansion capabilities. It can be seen that it will occupy a greater […]

WIZnet W5300-TOE MQTT publish and subscribe (micropython)

WIZnet W5300-TOE MQTT uses Nucleo-f429zi to publish and subscribe Forward: WIZnet W5300-TOE MQTT publish and Subscribe (micropython) Project Introduction These sections guide you through a series of steps from configuring the development environment to running the Ethernet example with the STM32f429zi (nuleo-f429zi) and the W5300-TOE For basic setup see the Getting Started guide https://github.com/Wiznet/W5300-TOE-MicroPython/blob/main/static/GettingStart.md Hardware […]

esp32c3 micropython oled real-time weather information

Directory Introduction Show results the code main.py ssd1306.py font.py Implementation ideas Introduction Hezhou esp32c3 micropython framework only supports 128*64 I2C oled The ssd1306 driver is optimized by me. It is different from others. To avoid errors, use my driver. Put the following two py files into the microcontroller, Search for Xinzhi Weather, register an account, […]

esp32 micropython oled real time clock

Introduction Hezhou esp32C3, 128*64 I2C oled, hardware i2c, put the following two py files into esp32. ssd1306.py is optimized by me. In order to avoid errors, use the ssd1306 driver I provided Only support 128*64 I2C oled Code main.py import network import urequests import ujson import time from machine import RTC,Pin,I2C,Timer from ssd1306 import SSD1306_I2C […]