Finally I got the code fixed that talks to the servos. The first AX-12A is moving. The scope screen shows the serial communication on the servo bus. Now I am expanding the functions to be able to talk with the three servos of the test foot. At the moment two AX-12A and one MX-28.
This servo configuration might change in the future, a parcel with more servos is on it’s way.
I had bought an Arduino for my Walker project, a Mega 2560 to have enough pins, memory and compute power. A nice piece of hardware, and easy to use with plenty of software, as I had heard.
I am not unexperienced with AVRs. Owning a bunch of SPI programmers and a JTAGICE3.
The first thing I realized was that the easy to use development environment only supports one source file. Well. And it’s rather minimalistic. I switched to real makefiles and Eclipse.
Then I found out that the standard libraries are mainly supporting a linear synchronous programming model without fancy timers and interrupt handlers. I did start to write my own libraries in plain C.
When I tried to plug an interrupt routine into USART1 I got errors because the default libraries did occupy all serial interrupts, not only the one of USART0 used for the USB connection. That’s understandable because the AVR isn’t made for hardware abstraction and dynamic configuration. I did remove all the Arduino C++ code and recycled an existing library for the console I/O.
Now I am happy with an Arduino using purely the hardware. A really nice piece. I bought a second one.
The first version of the walker test leg has been assembled. Servos are in place. The Tibia and the touch down sensor will be added later.
Now it’s time to start coding the control software.
Today I did some milling work of the joints of the first test leg. They are made of acrylic glass. It’s easy to handle after you got the trick. The joint between Femur and Tibia is milled from a massive block.