I'd appreciate any feedback, especially from more experienced devs. I built this JS class to send serial commands over the headphone port of an iPhone using Javascript and the HTML5 WebAudio API. This enabled me to use an iPhone application to control my embedded systems design senior project.
I don't know about the JavaScript code, but I did look at the uC code (EE459 repo I guess?).<p>Since you are already taking the flash hit with sprintf, you might be interested to know that you can redirect stdout to print all data through your serial line, i.e. just using printf. Saves going through an intermediate buffer. Looks something like this:<p><a href="http://pastie.org/8073251" rel="nofollow">http://pastie.org/8073251</a>
Great hack and worth doing just because it is a great hack, but since it was a senior project, wouldn't it have been easier to just grab an old Android phone off Ebay and use standard 2-way communication directly?
Here's something similar doing FSK with Javascript and HTML5 audio:<p><a href="https://github.com/NeoCat/FSK-Serial-Generator-in-JavaScript/" rel="nofollow">https://github.com/NeoCat/FSK-Serial-Generator-in-JavaScript...</a>
You could have applications that talk with your smartphone without a network and just a browser providing you can access your microphone in Android and iOS.
reply