🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    FATAL ERROR: Name m5line is not defined

    Bug Report
    1
    1
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sysdl132S
      sysdl132
      last edited by

      from m5stack import *
      from m5ui import *
      from uiflow import *
      import unit
      
      setScreenColor(0x514f4f)
      earth0 = unit.get(unit.EARTH, unit.PORTA)
      
      std = M5Circle(40, 91, 10, 0xFFFFFF, 0xFFFFFF)
      text0 = M5TextBox(61, 119, "Status", lcd.FONT_Default, 0x78ff00, rotate=180)
      text1 = M5TextBox(77, 149, "Water monitor", lcd.FONT_DefaultSmall, 0x00e5ff, rotate=0)
      label0 = M5TextBox(77, 58, "value:", lcd.FONT_Default, 0xe4ff00, rotate=180)
      rectangle0 = M5Rect(2, 41, 34, 20, 0xFFFFFF, 0xFFFFFF)
      angread = M5TextBox(30, 57, "err", lcd.FONT_DefaultSmall, 0x000000, rotate=180)
      rectangle1 = M5Rect(16, 11, 20, 20, 0xFFFFFF, 0xFFFFFF)
      label1 = M5TextBox(77, 27, "Unit std:", lcd.FONT_DefaultSmall, 0xfffe00, rotate=180)
      line0 = M5Line(M5Line.PLINE, 16, 128, 62, 128, 0xFFFFFF)    # <--bug line
      need = M5TextBox(75, 74, "Water needed!", lcd.FONT_DefaultSmall, 0xff0000, rotate=180)
      
      # sysinit
      def init():
        need.hide()
        angread.setText('0')
        rectangle0.setBgColor(0xff0000)
        rectangle0.setBorderColor(0xff0000)
        std.setBgColor(0xff0000)
        std.setBorderColor(0xff0000)
      
      
      
      init()
      while True:
        if False:
          angread.setText(str(earth0.analogValue))
        elif False:
          pass
        wait_ms(2)
      

      Baudrate for M5 core/Stick/camera:115200/921600
      For M5StickC:115200/230400/750000/1500000
      For M5StickV:115200/921600/1500000
      For Atom:115200/230400/921600

      1 Reply Last reply Reply Quote 0
      • First post
        Last post