Arduino Due Issues

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:

  1. 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.
  2. Replace the Adafruit_ST7735 library with the modified version at” target=”_blank which has been modified to support the Arduino Due
  3. Update the Adafruit_GFX library with the changes found at
  4. Create a new folder in the Arduino IDE location at hardware/arduino/sam/cores/arduino/avr/
  5. Create a new file at hardware/arduino/sam/cores/arduino/avr/pgmspace.h and enter contents found at

Some issues are resolved but others remain.


#include <Adafruit_GFX.h> // Core graphics library // OK after changes to libraries
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h> // OK
// #include <SD.h>

void setup() {
// put your setup code here, to run once:


void loop() {
// put your main code here, to run repeatedly:



In file included from sketch_may19a.ino:20:
C:\arduino-1.5.2\libraries\Adafruit_ST7735/Adafruit_ST7735.h: In member function 'uint16_t Adafruit_ST7735::Color565(uint8_t, uint8_t, uint8_t)':
C:\arduino-1.5.2\libraries\Adafruit_ST7735/Adafruit_ST7735.h:116: error: 'newColor' was not declared in this scope

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.

C:\arduino-1.5.2\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In member function 'void Adafruit_ST7735::commonInit(uint8_t*)':
C:\arduino-1.5.2\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:266: error: cannot convert 'volatile RwReg*' to 'volatile uint8_t*' in assignment
C:\arduino-1.5.2\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:268: error: cannot convert 'volatile RwReg*' to 'volatile uint8_t*' in assignment
C:\arduino-1.5.2\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:276: error: 'SPI_CLOCK_DIV4' was not declared in this scope
C:\arduino-1.5.2\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:283: error: cannot convert 'volatile RwReg*' to 'volatile uint8_t*' in assignment
C:\arduino-1.5.2\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:285: error: cannot convert 'volatile RwReg*' to 'volatile uint8_t*' in assignment

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.

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.

By richteel

Software and hardware developer who likes learning new things with a passion of sharing knowledge with others.

One reply on “Arduino Due Issues”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.