Adrianfu
Posts: 45
Joined: Tue Dec 01, 2015 7:13 am
Location: Yarraman Australia

internet radio issues

Mon Feb 15, 2016 9:17 am

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
Attachments
error.jpg
error.jpg (41.03 KiB) Viewed 1099 times

User avatar
topguy
Posts: 5908
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: internet radio issues

Mon Feb 15, 2016 10:42 am

Looks like "fonts-freefont-ttf" package contains the file at least, check if that is installed.

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

Adrianfu
Posts: 45
Joined: Tue Dec 01, 2015 7:13 am
Location: Yarraman Australia

Re: internet radio issues

Mon Feb 15, 2016 12:40 pm

All the fonts are there.

Adrian

User avatar
topguy
Posts: 5908
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: internet radio issues

Mon Feb 15, 2016 1:19 pm

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.

Adrianfu
Posts: 45
Joined: Tue Dec 01, 2015 7:13 am
Location: Yarraman Australia

Re: internet radio issues

Mon Feb 15, 2016 3:26 pm

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

Adrianfu
Posts: 45
Joined: Tue Dec 01, 2015 7:13 am
Location: Yarraman Australia

Re: internet radio issues

Tue Feb 16, 2016 4:13 am

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

drjam
Posts: 11
Joined: Sun Nov 13, 2016 7:20 am
Location: Austraya

Re: internet radio issues

Sat Dec 17, 2016 9:00 am

wanted to say thanks for this, it helped me :)
Couple of pi 3's, a pi 2 and an assortment of hardware.
your move brain.....your move

Return to “Troubleshooting”