1212#--| User Config |-----------------------------------
1313FREQ = 89.00
1414PLAYLIST = "test"
15+ STATION_NAME = "PiPyPirate Radio"
1516UPDATE_RATE = 0.5
1617#----------------------------------------------------
1718
5657)
5758radio .tx_frequency_khz = int (FREQ * 1000 )
5859radio .tx_power = 115
60+ radio .configure_rds (0xADAF , station = STATION_NAME .encode ())
5961
6062# MPD
6163mpc = mpd .MPDClient ()
@@ -103,6 +105,8 @@ def update_display():
103105 draw .text ( (5 , 150 ), artist , font = INFO_FNT , fill = ARTS_CLR )
104106 draw .text ( (5 , 170 ), album , font = INFO_FNT , fill = ALBM_CLR )
105107 draw .text ( (5 , 190 ), song , font = INFO_FNT , fill = TITL_CLR )
108+ rds_info = "{}:{}:{}" .format (artist , album , song )
109+ radio .rds_buffer = rds_info .encode ()
106110
107111 perc = float (status ['elapsed' ]) / float (status ['duration' ])
108112 draw .rectangle ( (5 , 215 , 235 , 230 ), outline = PROG_CLR )
@@ -115,6 +119,8 @@ def update_display():
115119
116120last_update = time .monotonic ()
117121
122+ print ("Now broadcasting {} on {}FM" .format (STATION_NAME , FREQ ))
123+
118124while True :
119125 now = time .monotonic ()
120126 try :
0 commit comments