Live data from Hacker News

Show HN: Serial communication using the WebAudio API

github.com

1–10 of 16 posts

Re: Show HN: Serial communication using the WebAudio API

#2
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.

Re: Show HN: Serial communication using the WebAudio API

#6
post #2

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.

This is great! Very interesting idea, if I had more time I would incorporate it into my semester project. My solution using putty now looks so cheap.

Re: Show HN: Serial communication using the WebAudio API

#7
post #4

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?

Possibly. It was an embedded systems class, and I have a background dealing more with webdev and audio systems, so I figured I could combine all three into something novel. It actually worked out really well for the purpose, which was supposed to be a power-saving application. This way required only the addition of a comparator chip between the ATMega168 and the headphone line, which made it a super low power (and computationally light) way to communicate.

Re: Show HN: Serial communication using the WebAudio API

#8

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

Correct. The next step on this project will be to try and get two way communication working. I ran out of time before the class ended to get that established. If I remember correctly I ran into some issues with the mobile safari and the microphone input via javascript. I believe PhoneGap provides an API for this though.

Re: Show HN: Serial communication using the WebAudio API

#9
post #4

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?

I personally love the portability that web api provides and the fact that I can run it without overhead right now.

Re: Show HN: Serial communication using the WebAudio API

#10
post #3

Neat project, but would be great to see a demo page. Also, s/buad/baud/

I'm in the process of building a more general purpose dev board using the same processor I used for the class, so once I've got that up and running I'll try and post more "How to" related stuff on the github.
Post reply on HN