View Single Post
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#7
pyfmradio is not a ready-made application. The example script just demonstrates its usage. Also be sure to have a headphones cable plugged in. Otherwise it won't be able to find any stations.

Here's an example:

Code:
from FMRadio import FMRadio
import time

radio = FMRadio()
radio.set_volume(100)
radio.set_frequency(90.10)

try:
    while (True): time.sleep(0.1)
except KeyboardInterrupt:
    # be sure to switch off the radio after usage, or it will drain battery
    radio.close()