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
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?
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@lists.squeakfoundation.org