Cuis USB?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cuis USB?

Kirk Fraser
I like the clean appearance of Cuis.  How can I get started on accessing USB ports? 
 
I would like to do live image processing and communicate with PIC chips.
 
Thanks,
Kirk Fraser

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Cuis USB?

Kirk Fraser

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?


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: Cuis USB?

David T. Lewis
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


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

serial.zip (8K) Download Attachment