Hello guys,

So I have a project that uses MyRobotLab. The concept aims to send a data via MRL on an arduino that is connected to a pic18f2480. The latter sends via a CAN communication these data to the servomotors. However I am beginner and I need to insert data architecture input, to control all servomotors, like (?,?,?,?,?,?). Unfortunately I do not see how to do it.

Thank you in advance.

 

GroG

5 years ago

Hi Andy75, and welcome ...

What is (?,?,?,?,?,?) , do you mean a stream of data ?

Hi thanks you.

Yes, it's a stream of data that indicates the position we want. First of all, I work with the hand, so 6 servomotors. That is why I have 6 ?, each for a position. If I only want move the thumb by 45°, I will send (45,0,0,0,0,0).

I'm guessing you want to buffer the data from the stream ...

in pseudo code :

newByte = readStream(1)
buffer[byteCount] = newByte 

byteCount++

if (byteCount % 6 == 0) {

     hand.moveTo( buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5] )

}

Yeah, it's the idea. But there are some details, maybe obvious, I don't understand. What is the difference between the arduino service and the inmoov hand service? I mean, from the beginning, I only used the first one, because I focus on the communication between MRL and my arduino. And then, in the seconde part, use a CAN module.

Does this explanation help ?

InMoov is a composite service .. it contains many other services, one of which (actually 2) are Arduinos.

The Arduino service in MRL controls an "Arduino" - Arduinos are great for controlling servos, and reading pin data, and writing signals out.

InMoov service understand opening and closing hands, in turn to open or close the fingers of a hand something that can talk to servos is needed.  So, an InMoov service controls an Arduino service, which controls the Servos of a hand.

so InMoov can do this :
i01.closeHand() and all the details of moving servo fingers his done for you ....

Yes thanks, every tips are useful :).

Now I am sure I will use the Aruduino service. An other question, is there a maximum size of data that I can send to the Arduino? 

There is no limit to a stream sent to the Arduino service you buffer it as I suggested.  For more clarity I'd recommend making a block diagram with lines/wires showing all the connected parts and arrows showing desired data flow..

- Our project : Use MRL to send commands to servomotors via arduino+PIC
 
 
After several hours, I realize that I do not understand how myrobotlab works.
So I have some questions to organize my ideas.
First of all, I only use the Arduino Service. 
 
Questions : 
1) How does actually work MRL ? 
-Which type of data we need to create in MRL input ?
- What data are sent by MRL ?
-what type of data ? -a srting ? -an int ? -a table ? ....
-With the arduino code, which function with the MRL API is used to get the data from MRL ?
-How to print the output data from MRL to the Arduino, in order to debugg ?
 
Here is a prototype of the architecthure. It is not the finale version :
 

Unffortunetly, I only have an Arduino. But the second part, with the I2C communication , is not a problem. I need to start with the MRL interface. Sorry if I ask question which are obvious.

That is fine.  They are not obvious questions, so don't worry.

The MyRobotLab Arduino service expects a specific INO sketch to be running on the Arduino. 
With the sketch communcation between MRL (MyRobotLab) and Arduino is possible.

MyRobotLab tell's the Arduino through serial communication in the sketch, what it needs to do.  That's how most of InMoov currnetly works .. You tell InMoov to do something --> the speech recognizer tells a body part e.g. like InMoovHand -->  the body part tells the Servo ---> the servo tells the ServoController..

In your case you want to establish a new protocol from Arduino over I2C ---to--> Pic --to--> Servo

Its certainly possible, but it means you want to use Arduino only for the I2C services - so I suspect you'll be writing a lot of Python to support this.

I'm guessing the Python you need to write is to send commands over I2C to the Pic .. Do you have this already ?  Do you have this running with a Arduino sketch ?

Hi,

Finally, I changed the I2C protocole to a UART protocole due to the script to etablish the connection. So, now , I know I can communicate. But if I need to send a specific data to the TX and RX pins, I must use eht monitor and send it?

VALL-E

5 years ago

Hi!

I can not find where can I download *.ino sketches for InMoov arduino boards.

Help me please, give me the link