Problem with piezo

hi

i’m trying to execute this code (from http://www.tinyclr.com/downloads/Component/Broch_Piezo.pdf)

using System;
using Microsoft.SPOT;
using System.Threading;
using GHIElectronics.NETMF.FEZ;
public class Program
{
public static void Main()
{
// Create Piezo (speaker) object assigned to the a Peizo Component connected to Di5 with PWM feature
FEZ_Components.Piezo myPiezo = new FEZ_Components.Piezo(FEZ_Pin.PWM.Di5);
// Play a 4kHz. tune for 5 Seconds
myPiezo.Play(4000, 3000);
Thread.Sleep(2000);
// Play sequencial tunes
int[] freq = new int[] { 2000, 3000, 4000, 5000 };
int[] duration = new int[] { 200, 100, 200, 100 };
while (true)
{
myPiezo.Play(freq, duration);
Thread.Sleep(1000);
}
Thread.Sleep(Timeout.Infinite);
}
}

it compiles without errors, but when i try to run it say’s

[quote]The program ‘[5] Micro Framework application: Managed’ has exited with code 0 (0x0).
[/quote]

without doing anything.

any suggestions?

have a nice day

You need to update your firmware and see this too:
http://www.tinyclr.com/forum/1/154/

Also see the big red “ALERT” on the right side on this website :slight_smile:

chimp, I do not think it’s visible enough.

Maybe we should get a big flashing banner! B)

thank your very much

it worked

have a nice day