[Newbies] Thanks Dave!

Overcomer Man overcomer.man at gmail.com
Fri Nov 13 23:00:20 UTC 2009


Date: Fri, 13 Nov 2009 16:44:04 -0500
From: "David T. Lewis" <lewis at mail.msen.com>
Subject: Re: [Newbies] Re: Cuis USB?
To: "A friendly place to get answers to even the most basic questions
       about   Squeak." <beginners at lists.squeakfoundation.org>
Message-ID: <20091113214404.GA85685 at shell.msen.com>
Content-Type: text/plain; charset="us-ascii"

On Fri, Nov 13, 2009 at 12:35:00PM -0800, Overcomer Man wrote:
> A good computer language should give progammers complete control over all
> aspects of the machine from multiple processors to all peripherals, making
> an Operating System unnecessary.  Is Smalltalk such a language?  If so
> where's some example USB code?

The simple answer is no, Smalltalk is not such a language. But it is
possible to use it in that manner, and many people use it for device control
and run it without an operating system (google "SqueakNOS" for example).

With respect to your original question, I am not currently using USB serial
ports with Squeak or Cuis, but I believe that you can do so as follows:

- Load the class SerialPort into Cuis. You can file this out from the latest
Squeak trunk image, and I have attached a copy of it to this mail.

- Use the latest virtual machine for your platform. This will have the
necessary support for accessing named serial devices.

- In Cuis, make an instance of SerialDevice and use it to open your USB
serial device and read and write to it. This will probably look something
like this:

 myUsbPort := SerialPort new.
 myUsbPort openPort: '/dev/someUsbDevice'.
 myUsbPort nextPutAll: 'some data to send'.
 responseString := myUsbPort readString.
HTH,
Dave

------------------------------------------

Dave,

Thanks very much!  Those tips will keep me busy for a long time.

I recommend your answer be put into a beginners FAQ or someplace permenant.

Kirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20091113/e3069fbc/attachment.htm


More information about the Beginners mailing list