Hi here I am again to have some clarifications on the software, I would like to customize the cat with new movements but first I would like to understand some lines of the program that I am not clear the first is “const char crR [] PROGMEM = {26, 0, - 5 ,
35, 37, - 48, - 53, - 23, - 28, 1, 12,
40, 34, - 47, - 59, - 24, - 27, 1, 12,
45, 31, - 46, .......... "
the first three numbers what they indicate, the first is the number of lines (or frames) that make up the movement but I don't know about the other two,
the second I would like to know the difference between these two lines:
"Const char crR [] PROGMEM = {
26, 0, - 5,
35, 37, - 48, - 53, - 23, - 28, 1, 12,
40, 34, - 47, - 59, - 24, - 27, 1, 12,
45, 31, - 46, ......... "
"Const char balance [] PROGMEM = {
1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 30, 30, - 30, - 30, 30, 30, - 30, - 30,};
because the first is composed of 8 characters for each line while the second is composed of 16, I hope I was clear.
thanks for your patience
Giuseppe
The previous demos have larger amplitude of head/tail movements which is unnatural. In this one I reduced the amplitude and did some finer tuning on calibration and other parameters. Adding background music also helps to your subjective impression of the pace.
#defines batt A0
Pin A0 is used to measure the voltage of battery. It's not in the released code but will be in effect to detect overcurrent and give the cat a break after a sprint.
hi, congratulations 🙀 I saw the new video of the change of the head-tail movement is now more natural, you could tell us the modification you made. I try to understand how the opencat.h software works and I would like to know what this battery check is for "#defines batt A0".
Thank you for your patience and availability.
Giuseppe
Fantastic, thanks again and see you soon.
We await new developments with ultrasound sensor.
Giuseppe
Just add this line. Think how jointIdx (0,1,2) is used to set the period for head's motion.
Demo:
BTW, your build of Nybble walks so well! Good job! I've added it to my DIY OpenCat playlist.
hi, thank you for your quick and comprehensive answer, if I understand correctly to move my head while walking it is enough to add the following lines in nybble.ino:
calibratedPWM (0, panAngle);
calibratedPWM (1, tiltAngle);
float panAngle = 40 * sin (timer * 2 * M_PI / motion.period);
calibratedPWM (0, panAngle);
float tiltAngle = 15 * sin (timer * 4 * M_PI / motion.period);
calibratedPWM (1, tiltAngle);
I would like to know where in the software to insert them.
Thanks again
Giuseppe