[Newbies] (no subject)

Markus Lampert markuslampert at yahoo.com
Sun Feb 26 19:30:06 UTC 2012


Did you set the baud rate before you called openPort: ?
All configuration of your SerialPort instance has to be done before opening the device. I know sounds a little non-intuitive but that's how it works.

Are you executing each line in your workspace individually, or are you selecting the whole block and hit Ctrl-D?

If you run the workspace by selecting all and hit execute it probably will not work. The SerialPort interface is asynchron which means Squeak will probably execute 'port close' before the initial string '>01100' is completely sent - especially if you don't change the baud rate (default is 9600 baud).

Have fun,
Markus




>________________________________
> From: Overcomer Man <overcomer.man at gmail.com>
>To: beginners at lists.squeakfoundation.org 
>Sent: Sunday, February 26, 2012 11:04:17 AM
>Subject: [Newbies] (no subject)
> 
>
>Dave,  
>
>
>Thanks, I was able to file out SerialPort from Squeak into Cuis.  I tried this code in a workspace:
>
>
>| port oc |
>port := (SerialPort new) openPort: 'COM4'.
>oc := OrderedCollection new.
>port nextPutAll: '>01100'.
>oc add: port readString.
>oc add: port readString.
>oc add: port readString.
>port close.
>oc 
>
>
>Some data was sent out as indicated by an LED at the connection.  Unfortunately, the response was empty strings which is incorrect based on the off shelf software.  I tried adjusting the baud rate but that did not help.  Any suggestions?  Thank you.
>
>
>Also, I'm interested in hooking the serial port code up to an application window like the original.  Can you please point me to a tutorial to learn how?  Eventually I want to migrate from simple text response to tables or graphs.
>
>
>------------------
>
>
>jinoh67,  
>
>
>> "To access IO device, use FFI" 
>sounds like good advice but without more details I can't do it.  Can you refer me to a tutorial on using FFI?
>
>
>Thanks,
>Kirk Fraser
>_______________________________________________
>Beginners mailing list
>Beginners at lists.squeakfoundation.org
>http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120226/3c0f9134/attachment.htm


More information about the Beginners mailing list