ESP32 DO
Introduction
ESP32-DO Development Edition is a powerful and flexible development board suitable for the development of the Internet of Things, embedded systems and smart devices. Based on the ESP32 microcontroller, it has rich expansion interfaces and communication functions, and is compatible with development environments such as Arduino and MicroPython, enabling developers to quickly get started and develop and debug. Whether you are a beginner or an experienced developer, the ESP32-DO Development Edition is an ideal choice.The ESP32-Do development board has motor drivers and supports two motor drivers. There are two types of onboard motor interfaces: KF210 (ordinary motor) and Ph2.0-6P (encoded motor).
Pin diagram
|
= Arduino example code
Control LED lights
''// 引入ESP32开发库 #include <Arduino.h> // 定义LED灯引脚 const int ledPin = 13; void setup() { // 初始化LED灯引脚 pinMode(ledPin, OUTPUT); } void loop() { // 控制LED灯每隔一秒亮灭 digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); } ''
Micropython sample code
Control the LED lights
''import machine import time led_pin = machine.Pin(13, machine.Pin.OUT) while True: led_pin.on() # 点亮L13灯 time.sleep(1) # 延时1秒 led_pin.off() # 关闭L13灯 time.sleep(1) # 延时1秒 ''
评论
Hola, tienen algún código de ejemplo de como poder utilizar un motor de 2 pines tradicional, no me esta funcionando, saludos