horchler / DynamixelQ

Library to control ROBOTIS Dynamixel smart servo actuators with the OpenCM9.04 microcontroller
12 stars 5 forks source link

Compatibility with arduino IDE #3

Open Rouno opened 5 years ago

Rouno commented 5 years ago

Dear Horchler,

I tried to import your library in Arduino IDE set with openCM board but unfortunately I'm getting compiler errors (same for USBprintf)

Would there be any easy way to make your libraries working with Arduino IDE which is a lot more convenient than ROBOTIS IDE ?

Many thanks

horchler commented 5 years ago

I was not aware that one could use the Arduino IDE to program the OpenCM9.04. Are you using this? I have not tried it myself yet. Are you able to run a basic blink demo? Where did you install install my DynamixelQ and USBprinf libraries? Can you share the compiler errors you get?

Have you seen this thread? There might be a bootloader issue with your board.

kandhariakhil commented 5 years ago

The communication form that Arduino and Open CM9.04 use are different. The compiler for Arduino will not be able to interpret any of the libraries that were originally for Open Cm9.04. Codes as basic as blink will not work. However there are libraries similar to DynamixelQ available for Arduino IDE. I have a worked on arduino based library for Dynamixel actuators and will make it public shortly.

Rouno commented 5 years ago

Dear @horchler and @kandhariakhil , I just followed the official Robotis tutorial to work with Arduino IDE : http://emanual.robotis.com/docs/en/software/arduino_ide/

BTW, they do recommend to use arduino IDE instead of robotis IDE whenever possible :)

Everything fine with openCM defined as default board. However I remember that official Dynamixel library with Robotis IDE returned errors sometimes in position reading. That's why I worked with horchler library instead.

To try DynamixelQ and USBprintf, I just tried to copy/paste the library folders from Robotis IDE to Arduino IDE.

Here are the errors I get when trying to compile DynamixelQ blink example :

_Arduino : 1.8.7 (Mac OS X), Carte : "OpenCM9.04 Board, OpenCM Bootloader"

In file included from /Users/renauddidier/Documents/Arduino/libraries/DynamixelQ/DXLQ.h:14:0, from /Users/renauddidier/Documents/Arduino/libraries/DynamixelQ/DynamixelQ.h:12, from /Users/renauddidier/Documents/Arduino/libraries/DynamixelQ/examples/blink/blink.ino:10: /Users/renauddidier/Documents/Arduino/libraries/DynamixelQ/Timing.h:14:19: fatal error: stm32.h: No such file or directory compilation terminated. exit status 1 Erreur de compilation pour la carte OpenCM9.04 Board

Ce rapport pourrait être plus détaillé avec l'option "Afficher les résultats détaillés de la compilation" activée dans Fichier -> Préférences._