using Microsoft.SPOT.Hardware;
namespace change_this_to_your_namespace
{
public class Program
{
public static void Main()
{
//Setup Analog on our first analog output channel
AnalogOutput output = new AnalogOutput((Cpu.AnalogOutputChannel)Cpu.AnalogOutputChannel.ANALOG_OUTPUT_0);
output.Scale = 3.3; //Set scale to maximum voltage offset
output.Write(0.5); //Write half of the maximum
}
}
}
I actually can’t find the AnalogOutput type in this SDK.
I think it was in the Microsoft.SPOT namespace, but its not there anymore…
I have added it in References,
It seems that my version of .NET micro framework does not include the AnalogOut type…
I don’t see it on MSDN as well…
I got WAV playing on my cobra 2 board.
Recorded some speech on the PC and used a free converter to convert to WAV, 8bit, 8khz, mono.
Seems that the audio is played faster than it should.
I had to configure the Data rate parameter to around 6KHz to get it to play correctly.
I also opened the converted file on a hex editor to varify the WAV header. Seems fine.
Can this be a timing problem with GHI libs on the G120?
Can GHI team help to verify this?
When I configured the Data Rate parameter to 8khz it made me sound like a chipmunk.
It started to sound correct when I lowered the Data rate to around 6KHz.