if you do import module "m5stack"
import m5stack
and do a:
dir(m5stack)
['__class__', '__name__', '__file__', 'btn', 'btnA', 'btnB', 'btnC', 'decoder', 'display', 'espidf', 'gc', 'lvesp32', 'machine', 'rtch', 'touch', 'power', 'rtc', 'lv', 'get_png_info', 'open_png', 'binascii', 'Axp192', 'i2c_bus', 'i2c', 'lcd', 'disp_buf1', 'buf1_1', 'buf1_2', 'disp_drv', 'indev_drv', 'button', 'time_ex', 'timEx', 'timeSchedule', 'timerSch', 'BM8563', 'Speaker', 'speaker', 'Rgb_multi', 'rgb', 'node_id', 'psram_init', '_remote_init', 'remoteInit']
you will see one of those methods is called: lcd
if you go again and do a
dir(m5stack.lcd)
['__class__', 'clear', 'print', 'BLACK', 'BLUE', 'BMP', 'BOTTOM', 'CENTER', 'COLOR_BITS16', 'COLOR_BITS24', 'CYAN', 'DARKCYAN', 'DARKGREEN', 'DARKGREY', 'FONT_7seg', 'FONT_Comic', 'FONT_Default', 'FONT_DefaultSmall', 'FONT_DejaVu18', 'FONT_DejaVu24', 'FONT_DejaVu40', 'FONT_DejaVu56', 'FONT_DejaVu72', 'FONT_Minya', 'FONT_Small', 'FONT_Tooney', 'FONT_Ubuntu', 'GREEN', 'GREENYELLOW', 'HSPI', 'ICON_App', 'ICON_AppIcon', 'ICON_AppMenu', 'ICON_Cloud', 'ICON_Eath', 'ICON_Key', 'ICON_ListOFF', 'ICON_ListON', 'ICON_Machine', 'ICON_Retry', 'ICON_SetMenu', 'ICON_Setup', 'ICON_USB', 'ICON_Url', 'ICON_Wifi', 'ICON_WifiBig', 'JPG', 'LANDSCAPE', 'LANDSCAPE_FLIP', 'LASTX', 'LASTY', 'LIGHTGREY', 'M5STACK', 'MAGENTA', 'MAROON', 'NAVY', 'OLIVE', 'ORANGE', 'PINK', 'PORTRAIT', 'PORTRAIT_FLIP', 'PURPLE', 'RED', 'RIGHT', 'SPRITE_16BIT', 'SPRITE_1BIT', 'SPRITE_8BIT', 'VSPI', 'WHITE', 'YELLOW', 'arc', 'attrib7seg', 'circle', 'clearwin', 'compileFont', 'drawCircle', 'drawLine', 'drawPixel', 'drawRect', 'drawRoundRect', 'drawSwitchBtn', 'drawTriangle', 'ellipse', 'fill', 'fillCircle', 'fillRect', 'fillRoundRect', 'fillScreen', 'fillTriangle', 'font', 'fontSize', 'getCursor', 'get_bg', 'get_fg', 'hsb2rgb', 'image', 'image_buff', 'line', 'lineByAngle', 'orient', 'pixel', 'polygon', 'println', 'qrcode', 'rect', 'resetwin', 'restorewin', 'roundrect', 'savewin', 'screensize', 'setColor', 'setCursor', 'setRotation', 'setTextColor', 'set_bg', 'set_fg', 'setwin', 'sprite_create', 'sprite_delete', 'sprite_deselect', 'sprite_drawGrayMap', 'sprite_select', 'sprite_show', 'text', 'textClear', 'textWidth', 'text_x', 'text_y', 'tft_deselect', 'tft_readcmd', 'tft_select', 'tft_setspeed', 'tft_writecmd', 'tft_writecmddata', 'triangle', 'winsize']
it will show you the methods for that.
one of them being "clear"
so...
if you do:
m5stack.lcd.clear()
you will clear screen.
AN alternative for dir() is to type the name of the module then a period "." and TAB key
like this:
m5stack.TABkey
I could have just told you to do:
import m5stack
m5stack.lcd.clear()
But i did all that so you can find more interesting stuff by yourself. Remember to check out some basic python tutorials.
About your error of core2 rebooting... yes that is the RTOS rebooting for a wrong memory access.