ev3dev-lang-python, rpyc and PIL
See original GitHub issueHi again! This is not a issue. I am working with rpyc. I need big fonts for lcd screen!
I got a beautiful example in ev3python (thanks @ndward!)
#!/usr/bin/env python3
from ev3dev.ev3 import *
from PIL import Image, ImageDraw, ImageFont
from time import sleep
lcd = Screen()
f = ImageFont.truetype('/usr/share/fonts/truetype/msttcorefonts/Arial.ttf', 75)
lcd.draw.text((3,0), 'Hello', font=f)
lcd.draw.text((2,55), 'world', font=f)
lcd.update()
sleep(7) # if run from Brickman, need time to see displayed image
The problem is ImageFont. How i can import the remote PIL module (and Image, ImageDraw, ImageFont)? is it possible? Any example? Any workaround?
DJuego
P.S: I am considering seriously to use ev3dev and ev3dev lang python for robotic teaching. Interactive programming is so appealing… I only wish to get things done as simple as I can.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
RPyC - ev3python - Google Sites
Getting ready for a programming workflow based on using RPyC with your python IDE rather than using a terminal. Before you can use...
Read more >Working with ev3dev remotely using RPyC
Install RPyC both on the EV3 and on your desktop PC. For the EV3, enter the following command at the command prompt (after...
Read more >Part 1: Introduction to Classic RPyC - Read the Docs
The modules property of connection objects exposes the server's module-space, i.e., it lets you access remote modules. Here's how: rsys = conn.modules.sys # ......
Read more >Part 3: Services and New Style RPyC
So far we have covered the features of classic RPyC. However, the new model of RPyC programming (starting with RPyC 3.00), is based...
Read more >Part 2: Netrefs and Exceptions - RPyC - Read the Docs
In Part 1: Introduction to Classic RPyC, we have seen how to use rpyc classic connection to do almost anything remotely. So far...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here is what I do to get the latest version installed (on EV3):
If you are using the latest developement version of ev3dev-lang-python (soon to be released as 0.7.1), then you can use bitmap fonts distributed with the library (see #225 and http://python-ev3dev.readthedocs.io/en/latest/other.html#bitmap-fonts for more details). The following works for me:
If you are working with the latest released version (0.7.0), you may still use @ndward’s example you referenced. The only change is that you need to import
PIL.ImageFont
remotely: