<pre>                                                                     <br>                                                              <br>                                                                     <br>                                             
<br><br>&quot;Can OpenMoko Make Coffee?&quot; - SoC Project Proposal <br>--------------------------------------------------<br><br>The &quot;Coffee HOWTO&quot; ( <a href="http://tldp.org/HOWTO/Coffee.html">http://tldp.org/HOWTO/Coffee.html
</a> ) begins by<br>asserting that  &quot;Linux DOES make Coffee, and it tastes good!&quot;; it then <br>goes on to describe how you can control devices like say a coffee machine <br>using the PC parallel port and some simple electronics.
<br><br>One of the  things I would like to do with a `made-for-hackers&#39;<br>phone like the Neo is to explore its use for controlling real-world<br>devices. The availability of a USB host controller and the presence<br>
of GNU/Linux and associated free software tools opens up an interesting<br>possibility.<br><br>USB capable microcontrollers are commonplace these days - one example <br>is the Microchip PIC18F2455. The device comes with built-in ADC, 
<br>PWM/timer units, analog comparators, digital I/O ports etc. It&#39;s easy<br>to write a program which runs on the microcontroller and does something<br>like this:<br><br>a) Listen to the USB port for a command from the phone
<br>b) switch(command) {<br>      case read_inputs: read and return the value on<br>                        the input pins<br>      case read_adc: read from the ADC and return the<br>                     value<br>      case read_period: measure time period of a signal
<br>                        on an input pin and return the value<br>      case generate_waveform: using the PWM unit, generate<br>                        a signal of a specified frequency<br>      ......<br>      .....<br>
    }<br><br>Now, if we design a Python library which sends out commands to the <br>microcontroller and receives the replies, we have a simple and <br>powerful means to interact with all kinds of sensors and real world<br>
electronics. Say we wish to measure temperature. Hook up the output<br>of a standard temperature sensor (say LM35) to an ADC input of the <br>microcontroller and execute a script on the phone:<br><br>&gt;&gt;&gt; v = read_adc()
<br>&gt;&gt;&gt; print v<br><br>What about a low frequency oscilloscope running on the phone? Simple,<br>just write a program which will keep on reading data in bulk from the<br>ADC and plot it! <br><br>For a glimpse of how much this idea can be developed, please check out
<br>the `Phoenix Project&#39; (home page: <a href="http://nsc.res.in/~elab/phoenix/">http://nsc.res.in/~elab/phoenix/</a> ).<br><br>My intention is to:<br><br>a) Build the microcontroller circuit <br>b) Write firmware, which can include a bootloader for easy updates
<br>c) Write the Python/C library and a few GUI apps.<br><br>I am sure a tool like this would be of great help to hardware hackers<br>who wish to do cool things with their Moko phones. Please let me know<br>your thoughts about this project.
<br><br>About myself: I am a 2nd year engineering student (Computer Science) at the Govt. Engineering<br>College, Trichur (India). <br><br><br>-Anil<br><br><br></pre>