<p>Date: Fri, 13 Nov 2009 16:44:04 -0500<br>From: "David T. Lewis" <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>><br>Subject: Re: [Newbies] Re: Cuis USB?<br>To: "A friendly place to get answers to even the most basic questions<br>
about Squeak." <<a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.squeakfoundation.org</a>><br>Message-ID: <<a href="mailto:20091113214404.GA85685@shell.msen.com">20091113214404.GA85685@shell.msen.com</a>><br>
Content-Type: text/plain; charset="us-ascii"</p>
<p>On Fri, Nov 13, 2009 at 12:35:00PM -0800, Overcomer Man wrote:<br>> A good computer language should give progammers complete control over all<br>> aspects of the machine from multiple processors to all peripherals, making<br>
> an Operating System unnecessary. Is Smalltalk such a language? If so<br>> where'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 "SqueakNOS" 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: '/dev/someUsbDevice'.<br> myUsbPort nextPutAll: 'some data to send'.<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>