tbx1
Posts: 1
Joined: Sun Nov 19, 2017 4:20 pm

buzzer sound in iot project c#

Sun Nov 19, 2017 4:34 pm

Chanced upon this article
https://github.com/gumslone/raspi_buzzer_player

the code is written in python , i would like to ask how to code this in c#

want to add this as a trigger for my rfid sensor when it senses a card

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10654
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: buzzer sound in iot project c#

Sun Nov 19, 2017 4:58 pm

tbx1 wrote:
Sun Nov 19, 2017 4:34 pm
the code is written in python , i would like to ask how to code this in c#
Really understand what the code does, then recreate it using C#.

want to add this as a trigger for my rfid sensor when it senses a card
add a music playing program as a "trigger"? doesn't make sense.... :mrgreen:

B.Goode
Posts: 6026
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: buzzer sound in iot project c#

Sun Nov 19, 2017 5:22 pm

Chanced upon this article
https://github.com/gumslone/raspi_buzzer_player

the code is written in python , i would like to ask how to code this in c#

Really understand what the code does
This outline might help:

The script expects to have a simple buzzer which can be instructed to make a buzz (note) of a specified frequency (pitch) for a specified length of time.

Tunes (melodies) are written as matching sequences of pitch and duration.

The player just goes through the melody sequences playing the required note for the right length of time.

That sounds simple enough to implement in almost any computer language.

I don't know any C#, but I once adapted a similar tune player written in Ruby for use with Sam Aaron's SonicPi.

Return to “Windows 10 for IoT”

Who is online

Users browsing this forum: No registered users and 3 guests