How to add motion to Rapiro ?
Sample Arduino Code was explain the basic motion #M0-M9 .
I want to more motion to Rapiro but , I don't know how to change
the parameter MAXMN .
I want make #M10 MOTION #M11 #M12 .
So Could someone teach me How to add the motion and How to change
parameters like MAXMN or MAXFN ect.......
Please have a look at this thread:
Following the conversation there you will find this link:
In the Arduino sketch rapiro_stopservo_01.ino I have tried to add additional motions. There are only small modifications to the original sketch necessary. At the moment there are 11 motions in this sketch. #M00...#M11. But it should be easy to add more motions there. Just increase MAXMN and add your desired motion matrices. But be aware of the limited memory of the Rapiro board. I don't know how many motions in total are possible.
You also might find this link interesting:
Good luck! It's not that difficult.
I wanted to add more motions to the Arduino sketch, so I took the rapiro_stopservo_01.ino firmware and changed
#define MAXMN 11 to
#define MAXMN 13
I extended the uint8_t motion array with two more blocks consisting of 8 frames like the existing ones.
When I upload this my Rapiro starts to cramp and doesn't react to any command typed in the serial monitor of the Arduino IDE.
With the original version everything works fine and I can control the Rapiro via serial monitor.
Is there anything else to change in the code?
it seems you can only have 10 motions because of the limited memory of arduino board. (it is confirmed here, in japanese: http://forum.rapiro.com/thread/222/) So, if you want to have more movement programmed you need to put the movement definition part to flash memory. Here is a good example by Oga-san (https://github.com/oga00000001/RAPIRO/archive/b1368d6efa66485bb0f48916a013a517f28a9018.zip)
Thank you so much. Now it is working without any problems. That example helped a lot.
I'm trying to compiling the code in Arduino IDE , it always complain two thing, how do you fix that ?
1. avr/pgspace.h: No such file or directory
2. afer I change to "avr/pgmspace.h", I pass the first fail notice but got another about :
prog_uint8_t' does not name a type