Problems with Firmata & Arduino UNO Clone

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

Problems with Firmata & Arduino UNO Clone

W. L. Cleveland

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

Reply | Threaded
Open this post in threaded view
|

Re: Problems with Firmata & Arduino UNO Clone

Denis Kudriashov
Hi William.

I think Serial port does not work in MacOS VM. 

пн, 26 нояб. 2018 г. в 21:59, William L. Cleveland <[hidden email]>:

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

Reply | Threaded
Open this post in threaded view
|

Re: Problems with Firmata & Arduino UNO Clone

Ben Coman
In reply to this post by W. L. Cleveland


On Tue, 27 Nov 2018 at 05:59, William L. Cleveland <[hidden email]> wrote:

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”.


Was the Arduino IDE closed before you started Pharo?
Or further, try Pharo immediately after booting your PC.

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Firmata & Arduino UNO Clone

Nicolai Hess-3-2
Hil William,

this works for me on windows 10 with a LoLin nodemcu v3.

Upload Firmata EchoString example with arduino ide.
Push Reset on the nodemcu.

firmata := Firmata new
    connectOnPort: 'COM3'
    baudRate: 57600.

firmata inspect

Sadly, I can not close and repoen the SerialPort, I have to close and reopen the pharo image first.
 


Am Di., 27. Nov. 2018 um 23:55 Uhr schrieb Ben Coman <[hidden email]>:


On Tue, 27 Nov 2018 at 05:59, William L. Cleveland <[hidden email]> wrote:

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”.


Was the Arduino IDE closed before you started Pharo?
Or further, try Pharo immediately after booting your PC.

cheers -ben

PharoScreenshot.png (145K) Download Attachment