public static void Main() { _fm = new FMClick(Hardware.SocketFour, ClockRatesI2C.Clock400KHz, 100); /* If you are outside the USA or Australia, you must change the Channel Spacing and Radio Band from the default of Spacing.UsaAustralia and Band.UsaEurope * In Europe - use Spacing.EuropeJapan and Band.UsaEurope. * In Japan - use Spacing.EuropeJapan and Band.Japan or JapanWide. * No other configurations are available. * * if (_fm.ChannelSpacing != FMClick.Spacing.UsaAustralia || _fm.RadioBand != FMClick.Band.UsaEurope) * { * _fm.SetRadioConfiguration(FMClick.Spacing.EuropeJapan, FMClick.Band.UsaEurope); * } */ //_fm.Volume = 1; //_fm.Station = 93.3; _fm.Volume = 7; _fm.Station = 93.3; _fm.RadioTextChanged += _fm_RadioTextChanged; new Thread(Capture).Start(); Thread.Sleep(Timeout.Infinite); }
private static void Main() { ////////// Set these to match your board ////////////// var clickRstPin = SC20100.GpioPin.PD4; var clickCsPin = SC20100.GpioPin.PD3; var clicki2cbus = SC20100.I2cBus.I2c1; /////////////////////////////////////////////////////// var radio = new FMClick(clickRstPin, clickCsPin, I2cController.FromName(clicki2cbus)); double currentStation = 101.9; int volume = 255; radio.Channel = currentStation; radio.Volume = volume; }
private static void _fm_RadioTextChanged(FMClick sender, string newradiotext) { Debug.Print("RDS Text received - " + newradiotext); }
private static void FM_RadioTextChanged(FMClick sender, System.String newradiotext) => Debug.WriteLine("RDS Text received - " + newradiotext);