You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi 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 python3fromev3dev.ev3import*fromPILimportImage, ImageDraw, ImageFontfromtimeimportsleeplcd=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.
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:
Well. I am overwhelmed. :-) Easily, I prefer the 0.7.1 option. However i don´t know how upgrade to the last development version the ev3dev and the Spyder editor too. I am a absolutely newbie in Python.
Anyway i have a alternative. :-P
Thank you again, ddemidov for your swift and clear answers. I will be on the watch for the 0.7.1 release.
For beginners, in general I'd recommend sticking to the official releases. This is mainly because it ensures that you can share your code with others and have it work properly. It's also helpful because the standard upgrade instructions will only work on your installation if it's based on the official package.
@ddemidov Is there anything that you think is blocking a release (#233)?
@WasabiFan, I'd like to do #230. This looks easy enough, just need to update my kernel 😸
Also, I am not yet sure about the best way to fix #234. Other than that, 0.7.1 seems ready to be released.
Activity
ddemidov commentedon Oct 28, 2016
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.ImageFontremotely:DJuego commentedon Oct 28, 2016
Well. I am overwhelmed. :-) Easily, I prefer the 0.7.1 option. However i don´t know how upgrade to the last development version the ev3dev and the Spyder editor too. I am a absolutely newbie in Python.
Anyway i have a alternative. :-P
Thank you again, ddemidov for your swift and clear answers. I will be on the watch for the 0.7.1 release.
DJuego
ddemidov commentedon Oct 28, 2016
Here is what I do to get the latest version installed (on EV3):
sudo apt-get remove python3-ev3dev git clone https://github.com/rhempel/ev3dev-lang-python cd ev3dev-lang-python python3 setup.py bdist sudo python3 setup.py install --forceDJuego commentedon Oct 28, 2016
O.o Amazing! I will consider to upgrade. In my opinion, this info is worthy of a place in the README.
DJuego
WasabiFan commentedon Oct 28, 2016
For beginners, in general I'd recommend sticking to the official releases. This is mainly because it ensures that you can share your code with others and have it work properly. It's also helpful because the standard upgrade instructions will only work on your installation if it's based on the official package.
@ddemidov Is there anything that you think is blocking a release (#233)?
ddemidov commentedon Oct 28, 2016
@WasabiFan, I'd like to do #230. This looks easy enough, just need to update my kernel 😸
Also, I am not yet sure about the best way to fix #234. Other than that, 0.7.1 seems ready to be released.