I have been working with the Arduino Due and version 1.5.2 of the Arduino IDE. I have been attempting to port a mini digital picture frame that I wrote for the Arduino Micro and have not been having much luck. The problem is that the Arduino Due is still relatively new and is a different family than the previous Arduinos.
The errors that have been encountered due to references to the avr libraries. (In particular avr\io.h and avr/pgmspace.h.)
In my attempt, I did the following:
- Created the program shown below to workout the library issues. Once I am able to resolve the library issues, I will be able to start porting the code.
- Replace the Adafruit_ST7735 library with the modified version at https://github.com/sngl/Adafruit-ST7735-Library” target=”_blank which has been modified to support the Arduino Due
- Update the Adafruit_GFX library with the changes found at https://github.com/elechouse/Adafruit-GFX-Library/commit/69e355325312a57412d8c4d0ec6298aa3b4ed917
- Create a new folder in the Arduino IDE location at hardware/arduino/sam/cores/arduino/avr/
- Create a new file at hardware/arduino/sam/cores/arduino/avr/pgmspace.h and enter contents found at https://github.com/arduino/Arduino/commit/0f5a5259ec038537ea51de0059e711fdeebc6ece
Some issues are resolved but others remain.
great post to read
Commented line 20 in the Adafruit_ST7735.h file as the Color565 function does not appear to be called elsewhere and the newColor function does not exist in any libraries. The following errors are then produced.
Why is it when people provide fixes they are rarely documented completely? This is one of the most frustrating things that I encounter. I can solve these issues if given enough time but unfortunately I do not have the luxury. I will come back to this later and attempt to resolve the remaining issues.
Here is a post of someone else trying to get the Adafruit display to work with the Arduino Due. http://21stdigitalhome.blogspot.com/2013/02/arduino-due-spi-display-nearly-defeated.html
To be fair, the Arduino Due is a totally different architecture and it will take time to port the libraries over to the new architecture. I hope to get some more time later to tackle this problem again as this is a great opportunity to learn more about the Arduino Due but I suspect that I will not be able to devote the time I need to accomplish much.