adding micropython examples (#2286)

* adding micropython examples

* adding micropython examples
This commit is contained in:
Uli Raich
2021-06-07 13:56:08 +02:00
committed by GitHub
parent ac8f4534a5
commit c60ed68e94
114 changed files with 4136 additions and 657 deletions

View File

@@ -5,15 +5,16 @@ line_points = [ {"x":5, "y":5},
{"x":180, "y":60},
{"x":240, "y":10}]
# Create new style (thick dark blue)
# Create style
style_line = lv.style_t()
lv.style_copy(style_line, lv.style_plain)
style_line.line.color = lv.color_make(0x00, 0x3b, 0x75)
style_line.line.width = 3
style_line.line.rounded = 1
style_line.init()
style_line.set_line_width(8)
style_line.set_line_color(lv.palette_main(lv.PALETTE.BLUE))
style_line.set_line_rounded(True)
# Copy the previous line and apply the new style
# Create a line and apply the new style
line1 = lv.line(lv.scr_act())
line1.set_points(line_points, len(line_points)) # Set the points
line1.set_style(lv.line.STYLE.MAIN, style_line)
line1.align(None, lv.ALIGN.CENTER, 0, 0)
line1.set_points(line_points, 5) # Set the points
line1.add_style(style_line, 0)
line1.center()