User Manual
adafruit_si4713.mpy
adafruit_bus_device
Before continuing make sure your board's lib folder or root filesystem has
the adafruit_si4713.mpy, and adafruit_bus_device files and folders copied over.
Next connect to the board's serial REPL (https://adafru.it/Awz) so you are at the CircuitPython >>> prompt.
Python Installation of SI4713 Library
You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also
require enabling I2C on your platform and verifying you are running Python 3. Since each platform is a little different,
and Linux changes often, please visit the CircuitPython on Linux guide to get your computer
ready (https://adafru.it/BSN)!
Once that's done, from your command line run the following command:
sudo pip3 install adafruit-circuitpython-si4713
If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use
CircuitPython on Python 2.x, it isn't supported!
CircuitPython & Python Usage
To demonstrate the usage of the sensor we'll initialize it and control the transmitter from the board's Python REPL.
Run the following code to import the necessary modules and initialize the I2C connection with the sensor:
Frequency Strength Scan
One interesting thing you can do with the Si4713 is measure the quality of an FM radio band. This is handy for example
to 'scan' the entire range of FM frequencies looking for possible radio station broadcasts (i.e. frequencies with a good
quality signal). This can help you find an unused frequency band to use for your transmitting.
The received_noise_level function can be called with a frequency (specified in kilohertz and only at 50khz steps) and
will return the noise level, or signal quality, in dBuV units. The radio supports a range of frequencies from 87.5mhz to
108mhz and you can scan them all with this code:
import board
import busio
import adafruit_si4713
i2c = busio.I2C(board.SCL, board.SDA)
si_reset = digitalio.DigitalInOut(board.D5)
si4713 = adafruit_si4713.SI4713(i2c, reset=si_reset, timeout_s=0.5)
for f_khz in range(87500, 108000, 50):
noise = si4713.received_noise_level(f_khz)
print('{0:0.3f} mhz = {1} dBuV'.format(f_khz/1000.0, noise))
© Adafruit Industries https://learn.adafruit.com/adafruit-si4713-fm-radio-transmitter-with-rds-rdbs-support Page 21 of 27










