brilliantlabsAR / monocle-micropython

Micropython ported to the Monocle
ISC License
215 stars 27 forks source link

Monocle keep reset\rebooting #283

Open moragab1993 opened 6 months ago

moragab1993 commented 6 months ago

Hello, I have an issue with my Monocle.

After I uploaded the code, the monocle keep reset itself, and I could not connect to it

The code I wrote is just simple code. that change the position between polyline and polygon

import display
import time

poly = display.Polyline([101, 0, 126, 25, 101, 50, 76, 25, 101, 0], display.WHITE)
poly2 = display.Polyline([101, 100, 126, 125, 101, 150, 76, 125, 101, 100], display.WHITE,thickness=1)
poly3 = display.Polyline([101, 200, 126, 225, 101, 250, 76, 225, 101, 200], display.WHITE,thickness=1)
poly4 = display.Polygon([101, 300, 126, 325, 101, 350, 76, 325, 101, 300], display.WHITE,thickness=1)

g=[poly4,poly3,poly2,poly]
display.show(g)
time.sleep(0.5)

poly4.move(0,-100)
poly3.move(0,100)
display.show(g)
time.sleep(0.5)
josuah commented 5 months ago

Apologies for the long wait! Assuming this was saved as main.py, what I suggest would be to try to hit Ctrl+\ (backslash) on the REPL. This would reboot the Monocle and skip main.py, which would allow you to eventually remove main.py.