Update(boards): micropython板卡执行 build:prod

This commit is contained in:
王立帮
2024-09-29 23:09:36 +08:00
parent 01696b9ceb
commit b15e67a168
26 changed files with 349 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ Micropython library for the MINI_WCH(TOUCH*2, MIC*1, Buzzer*1, PWM*2, Matrix8x12
=======================================================
@dahanzimin From the Mixly Team
"""
import time
import time, math
from esp import flash_read
from micropython import const
from framebuf import FrameBuffer, MONO_VLSB
@@ -215,6 +215,12 @@ class BOT035(FrameBuffer):
self.show()
time.sleep_ms(speed)
def pointern(self, x=_LEDS_W // 2, y=_LEDS_H // 2, l=_LEDS_H // 2, angle=0):
radian = math.radians(angle)
self.fill(0)
self.line(x, y, round(x + l * math.sin(radian)), round(y - l * math.cos(radian)), 1)
self.show()
def _wreg(self, reg, val):
'''Write memory address'''
self._i2c.writeto_mem(_BOT035_ADDRESS, reg, val.to_bytes(1, 'little'))