<p>Date: Fri, 13 Nov 2009 16:44:04 -0500<br>From: &quot;David T. Lewis&quot; &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;<br>Subject: Re: [Newbies] Re: Cuis USB?<br>To: &quot;A friendly place to get answers to even the most basic questions<br>
       about   Squeak.&quot; &lt;<a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a>&gt;<br>Message-ID: &lt;<a href="mailto:20091113214404.GA85685@shell.msen.com">20091113214404.GA85685@shell.msen.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;us-ascii&quot;</p>
<p>On Fri, Nov 13, 2009 at 12:35:00PM -0800, Overcomer Man wrote:<br>&gt; A good computer language should give progammers complete control over all<br>&gt; aspects of the machine from multiple processors to all peripherals, making<br>
&gt; an Operating System unnecessary.  Is Smalltalk such a language?  If so<br>&gt; where&#39;s some example USB code?</p>
<p>The simple answer is no, Smalltalk is not such a language. But it is<br>possible to use it in that manner, and many people use it for device control<br>and run it without an operating system (google &quot;SqueakNOS&quot; for example).</p>

<p>With respect to your original question, I am not currently using USB serial<br>ports with Squeak or Cuis, but I believe that you can do so as follows:</p>
<p>- Load the class SerialPort into Cuis. You can file this out from the latest<br>Squeak trunk image, and I have attached a copy of it to this mail.</p>
<p>- Use the latest virtual machine for your platform. This will have the<br>necessary support for accessing named serial devices.</p>
<p>- In Cuis, make an instance of SerialDevice and use it to open your USB<br>serial device and read and write to it. This will probably look something<br>like this:</p>
<p> myUsbPort := SerialPort new.<br> myUsbPort openPort: &#39;/dev/someUsbDevice&#39;.<br> myUsbPort nextPutAll: &#39;some data to send&#39;.<br> responseString := myUsbPort readString.</p>
<div>HTH,<br>Dave</div>
<div> </div>
<div>------------------------------------------</div>
<div> </div>
<div>Dave,  </div>
<div> </div>
<div>Thanks very much!  Those tips will keep me busy for a long time.</div>
<div> </div>
<div>I recommend your answer be put into a beginners FAQ or someplace permenant.</div>
<div> </div>
<div>Kirk</div>