title: Raspberry PI make a Buzzer Sound using C#
body: <p>So i'm trying to make a mini &quot;security system&quot; to check if i left my door open. Basically i have a Raspberry pi with a sensor that check if the door is opened or not if i left it openet a buzzer should make a beep to tell me that i left it open.
  I saw the SystemSounds.Beep.Play(); from the System.Media library, but how do i put it in my doorIsOpen method?</p>
  <pre><code>readonly GpioPin sensDoor = GpioController.GetDefault().OpenPin(6); // Pin door
  private Task checkDoor() {
      while (true){ 
          if(sensDoor.Read() == GpioPinValue.High) {
              faglDoor = true;
          }
          else {
              faglDoor = false;
          }
          Task.Delay(-1).Wait(1000);
      }
  }
  
  private async Task doorIsOpen()
  {
      while (true)
      {
          while (faglDoor)
          {
              
          }
      }
      
  }
  </code></pre>