Hi William. I think Serial port does not work in MacOS VM. пн, 26 ноÑб. 2018 г. в 21:59, William L. Cleveland <wlc1@columbia.edu>:
I have been unsuccessful in using an Arduino board with Pharo 6.1(32bit) and the Firmata package.
The board is an Arduino Uno clone (ELEGOO UNO R3). The board appears to work fine with the Arduino IDE, which was tested with the BLINK program. The Standard Firmata Library appears to have been successfully uploaded to the board using the Arduino IDE.
COM ports have been closed using
SerialPort allInstancesDo: [:port|port close].
On Windows 10, SerialPort inspect shows that ports are closed. However, firmata := Firmata onPort: âCOM3â baudRate: 576000 failed due to failure to open COM3. The serial port name was obtained from the Arduino IDE Tools menu. The board choice was âArduino Unoâ.
In MacOS 10.11.6, the same code generated a Cannot open comport message.
Independently of Firmata, the following line of code SerialPort allInstancesDo: [:port| port close] generated the following error message: âInstance of BlockClosure did not understand #SerialPort. The same code worked fine in Windows.
I am wondering if the SerialPort code in Pharo6.1 is sufficiently robust for a nonexpert programmer like myself, who only occasionally writes code for his own use. Previously, I wrote an application for a robotics project in 2008 using VisualWorks and the DLL&CConnect tool, which was quite successful. No more coding until just recently, when I started using Python. Would like to go back to Smalltalk if it is sufficiently robust.
Any help would be appreciated.
Lou Cleveland