johng
Hi,
 
I'm working on a project and I need to use an Arduino Leonardo board as a slave device. The problem is that when I try to upload the firmware (blank project) to the board with the MODBUS RTU communication enabled, an error appears, I don't know why. 
 
[203128%2F8249119%2Fmceclip0]
 
[203128%2F8249120%2Fmceclip0]
Reply 0 0
thiagoralves
 Arduino Leonardo uses native USB as opposed to the other boards that have UARTS tied up to USB to Serial converters. This was fixed in previous Arduino cores, but I guess the problem is back again. I’ll have to check it.
Reply 0 0
johng
Hi, 
 
Thanks for your response. After many attempts, I finally could solve the problem by editing the arduino code "Baremetal" that is in the path: OpenPLC_Editor\editor\arduino\examples\Baremetal
 
I attach the old code
[203128%2F8273433%2Fmceclip0]
 
and the modified code
[203128%2F8273434%2Fmceclip0]
Reply 0 0
murilo
Hey Johng,

Thank you very much for your help. After many, many attempts I can connect my Arduino Mega and Leonardo via Modbus.
Reply 1 0
thiagoralves
I applied the changes to the master branch. It should all be good now on the newer editor
Reply 0 0
johng
Glad I could help!! 
Reply 0 0
Reply