Page 1 of 1

internet radio issues

Posted: Mon Feb 15, 2016 9:17 am
by Adrianfu
I have been trying to get the Simon Monk internet radio working but having an issue with the display. All I get is a screen of dots on the OLED. I have formatted the SD card numerous times and followed the instructions in MagPi issue 35 to the letter but no luck. I am using a Pi2 with Jessie installed with all updates.

The error I get is is apparently something to do with a font file. Picture is attached. Any help would be appreciated.

Adrian

Re: internet radio issues

Posted: Mon Feb 15, 2016 10:42 am
by topguy
Looks like "fonts-freefont-ttf" package contains the file at least, check if that is installed.

https://packages.debian.org/jessie/all/ ... f/filelist

Re: internet radio issues

Posted: Mon Feb 15, 2016 12:40 pm
by Adrianfu
All the fonts are there.

Adrian

Re: internet radio issues

Posted: Mon Feb 15, 2016 1:19 pm
by topguy
Then you should look up the docs of ImageFont class and see if there are some settings for which directories it will search for fonts.
Or you could try to use full path if you know where the fonts are stored.

Re: internet radio issues

Posted: Mon Feb 15, 2016 3:26 pm
by Adrianfu
I have managed to get the OLED to show the radio station and title but I had to change which font the display uses

From this .............................

# Setup Display
device = ssd1306(port=1, address=0x3C)
#small_font = ImageFont.truetype('FreeMono.ttf', 12)
#large_font = ImageFont.truetype('FreeMono.ttf', 24)

to this..............................

small_font = ImageFont.load_default()
large_font = ImageFont.load_default()

Although it works I would like to change the large font to something larger. Any pointers?


Adrian

Re: internet radio issues

Posted: Tue Feb 16, 2016 4:13 am
by Adrianfu
Thanks for the help. I have finally resolved the problem with the fonts on my internet radio.
I changed the lines

#small_font = ImageFont.truetype('FreeMono.ttf', 12)
#large_font = ImageFont.truetype('FreeMono.ttf', 24)

to

#small_font = ImageFont.truetype('ssd1306/fonts/FreeMono.ttf', 12)
#large_font = ImageFont.truetype('ssd1306/fonnts/FreeMono.ttf', 24)

And all is good.
Sorry if these problems have been dealt with in the past but I am a newbie at these Pi doodads.

Adrian

Re: internet radio issues

Posted: Sat Dec 17, 2016 9:00 am
by drjam
wanted to say thanks for this, it helped me :)