Beispiel #1
0
        static void UpdateDisplay()
        {
            display.Clear();

            display.DrawRectangle(0, 0, 128, 64, true, false);

            display.DrawText(4, 4, "C# Radio");
            display.DrawText(4, 16, radio.GetFrequency().ToString("N1") + " MHz");
            display.DrawText(4, 28, radio.GetSignalLevel() + " db");
            display.DrawText(4, 40, radio.IsStereo() ? "Stereo" : "Mono");

            display.Show();
        }
        void UpdateDisplay()
        {
            display.Clear();

            display.DrawText(0, 0, $"{radio.GetFrequency()}");

            display.DrawText(0, 10, (radio.IsStereo() ? "stereo" : "mono"));
            stereoLed.State = radio.IsStereo();

            display.DrawText(0, 20, radio.GetSignalLevel() + "db");

            display.DrawText(0, 30, radio.IsMuted ? "mute" : "on");

            display.Show();
        }
Beispiel #3
0
        protected void TestTEA5767()
        {
            Console.WriteLine("TestTEA5767...");

            for (int i = 0; i < 8; i++)
            {
                Thread.Sleep(1000);

                radio.SearchNextSilent();

                Console.WriteLine($"Current frequency: {radio.GetFrequency()}");
            }

            radio.SelectFrequency(94.5f);
        }