adafruit / Adafruit_SHARP_Memory_Display

This is an Arduino library for the Adafruit Monochrome SHARP Memory Displays
http://www.adafruit.com/products/1393
Other
60 stars 54 forks source link

Problem with SPI using Arduino MKRZero + Adafruit breakout 400x240 Sharp Memory Display #11

Closed scrawneymonkey closed 7 years ago

scrawneymonkey commented 7 years ago

Working fine with the Arduino Due. I am able to load bmp hex arrays but converting to the MKRZero board the hardware SPI is not communicating therefore not displaying anything with same code.

I've been changing the clock speed for CS pin in the library to 48 from 84 and also, tried using SPI.setClockDivider(SPI_CLOCK_DIV16); and changing the SPI class. All of this with no success.

What is needed to change in the library to adjust for this board?

Thanks in advance.

scrawneymonkey commented 7 years ago

I have now attempted to change the

if defined (_VARIANT_ARDUINO_DUEX) to #if defined (_VARIANT_ARDUINOZERO)

so I can use the SAMD boards SPI library but it is giving me errors for any SPI commands in the library.

This is a sample of the errors:

/Users/xxxxx/Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display-master/Adafruit_SharpMem.cpp: In member function 'void Adafruit_SharpMem::begin()': /Users/xxxxx/Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display-master/Adafruit_SharpMem.cpp:91:25: error: no matching function for call to 'SPIClass::begin(int)' SPI.begin(SPI_CS_PIN); ^ /Users/xxxxx/Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display-master/Adafruit_SharpMem.cpp:91:25: note: candidate is: In file included from /Users/xxxxx/Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display-master/Adafruit_SharpMem.cpp:24:0: /Users/xxxxx/Library/Arduino15/packages/arduino/hardware/samd/1.6.14/libraries/SPI/SPI.h:110:8: note: void SPIClass::begin() void begin(); ^ /Users/xxxxx/Library/Arduino15/packages/arduino/hardware/samd/1.6.14/libraries/SPI/SPI.h:110:8: note: candidate expects 0 arguments, 1 provided /Users/xxxxx/Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display-master/Adafruit_SharpMem.cpp:93:39: error: no matching function for call to 'SPIClass::setClockDivider(int, int)' SPI.setClockDivider(SPI_CS_PIN, 48); // SPI clock frequency must be < 1 MHz

ladyada commented 7 years ago

hiya this library doesnt use SPI anymore - try it now!