We connect according to this guide from Trossen Robotics.
The diagram is replicated here for clarity.
We also replace the blink from my last post with the ArbotixM test blink. Which is effectively just swapping digital pin 13 (Arduino Uno) for pin 0 (ArbotixM).
Next we try to build the blinky for ArbotiX
$ ino build -m arbotix
This resulted in a error in arbotix/core/arbotix/HardwareSerial.cpp and arbotix/core/arbotix/Print.cpp.
After some googling it turns out that the definitions are out of date since the compiler has moved on and some definitions have been deprecated. The follwing changes where made to the two files to overcome this.
Changes in HardwareSerial.cpp line 1.
+ #define __AVR_LIBC_DEPRECATED_ENABLE__
Changes in HardwareSerial.cpp lines 50-51
- volatile int head;
+ volatile unsigned int head;
- volatile int tail;
- volatile int tail;
+ volatile unsigned int tail;
Changes in Print.cpp line 44
- const prog_char *p = (const prog_char *)ifsh;
+ const char PROGMEM *p = (const char PROGMEM *)ifsh;
- const prog_char *p = (const prog_char *)ifsh;
+ const char PROGMEM *p = (const char PROGMEM *)ifsh;
Also I didn't have the FTDI interface when I first got the ArbotixM due to an oversight.
This is where I hit a wall. The AVR ISP is not managing to write anything to the ArbotixM due to the minimum voltage being to low (> 400mV) which is very weird. After lots of thrashing an unplugging and plugging and measuring the ArbotiX voltage and trying different power supply and whatnot the error transmuted into a communication error where no response is received but the min voltage is fine now. I verified that the chip is still functioning by getting a serial response from the current program (written by the ISP) using the FTDI. Next I'm going to try to use avrdude directly from linux/raspberry to write the bootloader.
No comments:
Post a Comment