M5Dial and Canvas in Lcd module
-
Hello,
I'm trying to use the Canvas in Micropython and can't get things working.
from M5 import Lcd
toto=Lcd.newCanvas(60,50)
print(toto.width(),toto.height())
toto.fillCircle(x=10,y=10,r=5,color=0xffffff) # centre
toto.push(0,0)This does not display anything :/
I see that newCanvas can accept up to 4 arguments but can't find their signification.
Any help ?
Thansk !
-
Hello @Microbug
it looks like the circle is in the invisible upper left corner of the round display. Moving it helps. Try this:
from M5 import Lcd Lcd.clear() # added toto=Lcd.newCanvas(60,50) print(toto.width(),toto.height()) toto.fillCircle(x=50,y=40,r=5,color=0xffffff) # modified toto.push(0,0)
Thanks
Felix -
omg , I feel so stupid !
Many thanks !
Any idea for the 2 more parameters on newCanvas ?
-
-
@felmue many thanks !