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.
Hi Andy75, and welcome
Hi Andy75, and welcome ...
What is (?,?,?,?,?,?) , do you mean a stream of data ?
Need help project
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
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
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
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
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
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
Hi Andy,you need to share
Hi Andy,
you need to share your image with everyone - by default google drive is restrictive.
This is what I see ....
Ah sorry...
Ah sorry...
Because you want to
Because you want to drive/control the servos with the PIC ?
Yes it is the idea.
Yes it is the idea.
Do you have a RasPi ? I'm
Do you have a RasPi ?
I'm wondering because potentially this simplifies alot if you want to use I2C
RasPi --I2C--> PIC --> Servo
Unffortunetly, I only have an
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
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 ?
Not yet, I started with the
Not yet, I started with the scrypt Arduino.py to connect and control an Arduino.
Hi, Finally, I changed the
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?
downloading *.ino for InMoov
Hi!
I can not find where can I download *.ino sketches for InMoov arduino boards.
Help me please, give me the link
The ino comes "with" MRL when
The ino comes "with" MRL when MRL is installed ...
Here's a list of videos ...
https://www.google.com/search?q=myrobotlab+arduino&rlz=1C1ZCEB_enUS821US821&source=lnms&tbm=vid&sa=X&ved=0ahUKEwi3i4G8vJ3hAhWBON8KHVkUDIEQ_AUIDigB&biw=1536&bih=723
you should be able to find it under
resource/Arduino/MrlCom
thank you very much
thank you very much
Too many scared gophers about
Too many scared gophers about - both of you should get your own avatars ! ;)