张高兴的 Windows 10 IoT 开发笔记:FM 电台模块 KT0803L


This is a Windows 10 IoT Core project on the Raspberry Pi 2/3, coded by C#.

GitHub:https://github.com/ZhangGaoxing/windows-iot-demo/tree/master/KT0803L

Image

Connect

  • SDA - Pin3
  • SCL - Pin5
  • VCC - 3.3V
  • GND - GND

Reference

https://github.com/ZhangGaoxing/windows-iot-demo/tree/master/KT0803L/Reference

What Contains

In KT0803L.cs file

/// 
/// Initialize KT0803L
/// 
/// FM Channel ( Range from 70Mhz to 108Mhz )
/// Region
/// Transmission Power
/// PGA ( Programmable Gain Amplifier ) Gain
public async Task InitializeAsync(double mhz, Country country = Country.CHINA, RFGAIN rfgain = RFGAIN.RFGAIN_98_9dBuV, PGA pga = PGA.PGA_0dB);

/// 
/// Set FM Channel
/// 
/// MHz ( Range from 70Mhz to 108Mhz )
public void SetChannel(double mhz);

/// 
/// Set PGA ( Programmable Gain Amplifier ) Gain
/// 
/// PGA
public void SetPGA(PGA pga);

/// 
/// Set Transmission Power
/// 
/// 
public void SetRFGAIN(RFGAIN rfgain);

/// 
/// Set Pre-emphasis Time-Constant
/// 
/// Country
public void SetPHTCNST(Country country);

/// 
/// Set Mute Mode
/// 
/// Mute when value is true
public void SetMute(bool isMute);

/// 
/// Set Standby Mode
/// 
/// Standby when value is true
public void SetStandby(bool isStandby);

/// 
/// Set Bass Boost
/// 
/// Boost Mode
public void SetBassBoost(BassBoost boost);

/// 
/// Cleanup
/// 
public void Dispose();

How to Use

  • First, you need to create a KT0803L object. After that you should call InitializeAsync() to initialize.
KT0803L kt = new KT0803L();
// 108 MHz
await kt.InitializeAsync(108);
  • And you can input the audio through the 3.5mm earphone jack. After that, turn on your radio, listen to FM 108 MHz.
  • If you want to close the sensor, call Dispose().
kt.Dispose();