
ESP32-WROOM-32E 开发板
简介
ESP32-WROOM-32E 开发板,ch340c驱动
简介:ESP32-WROOM-32E 开发板,ch340c驱动开源协议
:GPL 3.0
描述
ESP32-WROOM-32E 开发板
ESP32-WROOM-32E 开发板使用的是CH340C串口芯片,方便我们手工焊接,接口是type-c,焊接难度有点大!!!与焊风枪一起更好喔☜
板载IO13LED,IO12 WS2812
IO0用户按键
说明
在焊接type接口时此开源的ESP32-WROOM-32E 开发板,禁止个人售卖,只作为个人交流分享,
软件说明
ESP32固件安装,可以使用Thonny进行Python编程或者使用其他软件进行开发,下面是我自己写的博客,希望能帮助到大家复刻https://blog.csdn.net/weixin_45477686/article/details/135020526?fromshare=blogdetail&sharetype=blogdetail&sharerId=135020526&sharerefer=PC&sharesource=weixin_45477686&sharefrom=from_link
LED呼吸灯Python代码:
from machine import Pin,PWM
import time
led13 = PWM(Pin(13))
led13.freq(1000)
def main():
while True:
for i in range(0 , 1023):
led13.duty(i)
time.sleep_ms(2)
for i in range(1023 , -1, -1):
led13.duty(i)
time.sleep_ms(2)
if __name__=="__main__":
main()
WS2812代码块:
from machine import Pin
from neopixel import NeoPixel
import utime
# 初始化Pin和NeoPixel对象
pin = Pin(12, Pin.OUT)
np = NeoPixel(pin, 1) # 灯珠个数为1
# 定义颜色
red = (255, 0, 0)
blue = (0, 0, 255)
green = (0, 255, 0)
off = (0, 0, 0) # 定义关闭状态为黑色
color = [red, blue, green]
# 定义一个函数来显示颜色和关闭灯
def show_and_off(color, num):
np[0] = color # 亮起指定颜色的灯
np.write()
utime.sleep(1) # 等待1秒
np[0] = off # 关闭灯
np.write()
# 主循环
while True:
for i in range(3):
show_and_off(color[i], i) # 这里的color[i]是之前定义的红色、蓝色、绿色的列表
实物展示说明
设计图

BOM


评论