张高兴的 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

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

/// <summary>
/// Set FM Channel
/// </summary>
/// <param name="mhz">MHz ( Range from 70Mhz to 108Mhz )</param>
public void SetChannel(double mhz);

/// <summary>
/// Set PGA ( Programmable Gain Amplifier ) Gain
/// </summary>
/// <param name="pga">PGA</param>
public void SetPGA(PGA pga);

/// <summary>
/// Set Transmission Power
/// </summary>
/// <param name="pga"></param>
public void SetRFGAIN(RFGAIN rfgain);

/// <summary>
/// Set Pre-emphasis Time-Constant
/// </summary>
/// <param name="country">Country</param>
public void SetPHTCNST(Country country);

/// <summary>
/// Set Mute Mode
/// </summary>
/// <param name="isMute">Mute when value is true</param>
public void SetMute(bool isMute);

/// <summary>
/// Set Standby Mode
/// </summary>
/// <param name="isStandby">Standby when value is true</param>
public void SetStandby(bool isStandby);

/// <summary>
/// Set Bass Boost
/// </summary>
/// <param name="boost">Boost Mode</param>
public void SetBassBoost(BassBoost boost);

/// <summary>
/// Cleanup
/// </summary>
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();

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏Golang语言社区

Go调试简单的内存泄漏

Memory leaks are a class of bugs where memory is not released even after it is n...

5283
来自专栏everhad

转载:Package by feature, not layer

The first question in building an application is "How do I divide it up into pac...

1410
来自专栏Linyb极客之路

你该怎么做?当你发现springboot扫描controller没有生效

加上@SpringBootApplication为啥就能扫描到,其实我也不知道。那就看下这个注解到底是个啥样的奇葩,它的注解构造了解一下

3.8K3
来自专栏智能计算时代

docs and demos of Watson services

Services 1)Language 1.1) AlchemyLanguage :Demo Document AlchemyLanguage is a c...

2746
来自专栏智能计算时代

Designing your SaaS Database for Scale with Postgres

? If you’re building a SaaS application, you probably already have the notion o...

2204
来自专栏杨熹的专栏

Kaggle winner 方案简介 | Understanding the Amazon from Space: 1st place

Below is a brief introduction of the 1st place winner solution to the competitio...

3998
来自专栏Aloys的开发之路

Peer Code Reviews Made Easy with Eclipse Plug-In

Origin Article: Peer Code Reviews Made Easy with Eclipse Plug-In Origin Author: ...

1756
来自专栏Pulsar-V

OpenCV编译参数一览

全部参数一览 //Path to a program. ANT_EXECUTABLE:FILEPATH=D:/apache-ant-1.10.1/bin/ant...

8426
来自专栏技术小黑屋

Package Stopped State Since Android 3.1

Since Android 3.1, Android has introduced a LaunchControl mechanism. It’s call S...

1031
来自专栏全栈架构

Spring Boot 与 Kotlin 上传文件

如果我们做一个小型的web站,而且刚好选择的kotlin 和Spring Boot技术栈,那么上传文件的必不可少了,当然,如果你做一个中大型的web站,那建议你...

1103

扫码关注云+社区

领取腾讯云代金券