I have a project coming up that will need to play a .wav file in sync with a serial stream at 9600 baud. I have written this in the past for a PC but it seems like the netduino might be capable of pulling this off. It was years ago that I wrote the PC program but I believe that I was doing something like calling a media player function to get the current time in the audio file to see when I should send the serial data. At first pass, the processor used should have enough speed to do this if I were to write my own code from scratch but the point here is that I would like to be lazy and let .net do all of the hard work for me which is pretty much dealing with FAT16/32 and reading two files from the SD card simultaneously. Both files are of uncompressed data which would need no processing so presumably I would just pass the audio to the PWM port and the serial data to the serial port.
Does anyone have any insight into if this really is possible and how difficult it would be to implement it?
Is this possible on a netduino plus?
Started by Jack Buffington, Sep 25 2010 09:34 PM
2 replies to this topic
#1
Posted 25 September 2010 - 09:34 PM
#2
Posted 03 October 2010 - 08:09 PM
Anyone?
#3
Posted 03 October 2010 - 10:42 PM
Hi Jack,
The long and the short answer...not sure.
If you just need to read bytes of data from the SD card and 'write' them to the PWM, it's totally doable. But reading/writing 1 byte at a time in managed C# code may not give you the performance you need...
The other thing you can do is use an SD shield...or write a native driver which takes a byte buffer and 'streams' the data to the PWM in the background...
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users