Live data from Hacker News

Show HN: Serial communication using the WebAudio API

github.com

11–16 of 16 posts

Re: Show HN: Serial communication using the WebAudio API

#11
I don't know about the JavaScript code, but I did look at the uC code (EE459 repo I guess?).

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:

http://pastie.org/8073251

Re: Show HN: Serial communication using the WebAudio API

#12

I don't know about the JavaScript code, but I did look at the uC code (EE459 repo I guess?). 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: http://pastie.org/8073251

Thanks for the tip! I'll try and implement this once I get the parts in for my new board.

Re: Show HN: Serial communication using the WebAudio API

#13
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 a great hack, very clever. You mention on the GitHub page that you use a comparator to convert the signal for the ATMega168. I know that the ATmega328 has an embedded comparator so I'm wondering how easy you think it would be to create a library for Arduino projects?

I currently have a few projects which are bound to servers so I can control them with web apps and this seems like a great way to liberate them from the network. Low-level analog signal processing is about where my knowledge comes to a screeching halt (hence using Arduinos in the first place) but I'd love to play around with any AVR code to try and implement this for high-level language hardware people.

Re: Show HN: Serial communication using the WebAudio API

#15
post #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.

Do you think there might be a way to receive data? Maybe measure the voltage drop from a normally high circuit?

Edit: Awesome project. (:

Post reply on HN