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 !
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login