Last seen: 2022-03-08 9:25 pm
So, they could be 'void'. I know it is good form to write return(0); for an int function that doesn't actually return a value. The Arduino IDE and the...
Yes, I have tried that. It seems there is a limit of 12 servos per timer. It may be an issue with the Pixie board, or the Mega328P chip, or how the se...
Still playing with the code. I commented out the 'if' test in the botHead_Sweep() function and added an output to the serial monitor if there is a cal...
If I can't resolve this using the Adeept Pixie board, I may try using an Arduino Nano and a 16-channel PWM servo driver board (l2C interface PCA9685) ...
The code link is between the " and the + symbols. Hover the pointer over the tools in the editor to see the tool name. Click the <> tool to add ...
I also tried creating another instance of a Servo object just for the head servo, thinking that servos had to be in groups of 12. Didn't work. Also tr...
Right, I did change the statement, but the thirteenth servo still doesn't move (attach). The other test code was just to prove there is nothing wrong ...
Perhaps this forum doesn't support BB code. Try the <> link in the editor.
The servo.h file has this note: Note that analogWrite of PWM on pins associated with the timer are disabled when the first servo is attached. ...
The thirteenth servo controlling the Hexapod head works with this code: /* * BotHeadSweep sketch tests the thirteenth servo * controlling the he...
The Arduino IDE has an Auto Format function that make the code look nice. I just copied and pasted into the code box. I haven't tried copy/paste from ...
Ok, changed it again. The idea is to write to servos 0 through 5 (left side) and 6 through 11 (right side) and servo 12 is the head. After failing the...
@Ron, here is the current loop() function. void loop() { for (int index = 0; index <= servoData; index++) { if (index <= 5) { ...
In the loop() function, I changed the for() loop to allow it to count up to 13. Still no joy :-( for (int index = 0; index <= servoData; index++...
I had to write separate functions for the legs on the right and left because the servos are mirrored on each side. That way, they all run the same out...