I've just tried to compile mrlcomm for an arduino Leonardo and here is the result :

 

C:\MRL\resource\Arduino\MrlComm\MrlComm.ino: In function 'void setup()':
MrlComm:89: error: no matching function for call to 'MrlComm::begin(Serial_&)'
  mrlComm.begin(Serial);
                      ^
C:\MRL\resource\Arduino\MrlComm\MrlComm.ino:89:22: note: candidate is:
In file included from C:\MRL\resource\Arduino\MrlComm\MrlComm.ino:53:0:
sketch\MrlComm.h:166:10: note: void MrlComm::begin(HardwareSerial&)
     void begin(HardwareSerial& serial);
          ^
sketch\MrlComm.h:166:10: note:   no known conversion for argument 1 from 'Serial_' to 'HardwareSerial&'
exit status 1
no matching function for call to 'MrlComm::begin(Serial_&)'
 
Seems to be a serial definition issue.
 
There are two serial ports on the Leonardo, Serial and Serial1. The Serial instance is via the onboard USB-to-serial conversion process. Serial1 is via the RX and TX pins.
 
 

Is it possible to add atmega32u4 support ? I would like to use µduino :

 

 

 

Seems working with that :

 

 

 

GroG

6 years 12 months ago

Hello Bretzel,
I appreciate your high quality post and question, but I'm a little confused.  Did you solve it ?  If so can you submit the necessary changes you did in a pull request ?

I know there are several Arduino types which have very different usb/serial connections, we most certainly would like to handle them all appropriately.

Recently @jeurg noticed a "non-standard" behavior of an Arduino Mega which only sometimes did a reset on port connect.  

See the following for references :

 

For the second link this seemed possibly relevant even if you get past the compiling error:

USB, Serial and Reset with the Leonardo under Linux (RPi)
The Arduino Leonardo uses a different solution for USB and serial. Please, first read this and this.

That said, Leonardo does NOT reset when a serial connection is established, regardless if the DTR line is used or not. This is very good if auto-reset is non desired. But how to reset Leonardo via serial?. The documentation sais you must open the serial port with 1200baud and then close. Here are two python programs, one for reading serial and the other one for reset. Both are tested on a Raspberry Pi.

Currently MRL depends on the reset .. which I think we should change, so that it doesn't rely on this "inconsistent" behavior of Arduino

Hi Grog,

 

After some tests, It doesn't work with MRL. I can build and send to the arduino. connection OK in MRL, but I can't attach a servo.

 

It wasn't so easy ! :D