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

Sharp Memory Display Not compiling for Arduino 101 #8

Closed slatedeer closed 4 years ago

slatedeer commented 8 years ago

Hi all, I am in urgent need of help compiling the code for the Sharp Memory Display on my Arduino 101. Any assistance would be greatly appreciated!!

Here's the error message I keep getting:

Arduino: 1.6.9 Hourly Build 2016/03/25 03:03 (Mac OS X), Board: "Arduino/Genuino 101" Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp: In constructor ‘Adafruit_SharpMem::Adafruit_SharpMem(uint8_t, uint8_t, uint8_t)’: Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:70:15: error: cannot convert ‘uint32t* {aka long unsigned int}’ to ‘volatile uint8t {aka volatile unsigned char_}’ in assignment clkport = portOutputRegister(digitalPinToPort(_clk)); ^ Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:72:15: error: cannot convert ‘uint32t {aka long unsigned int_}’ to ‘volatile uint8t {aka volatile unsigned char*}’ in assignment dataport = portOutputRegister(digitalPinToPort(_mosi)); ^ Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp: At global scope: Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-2’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] clr[] = { ~1, ~2, ~4, ~8, ~16, ~32, ~64, ~128 }; ^ Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-3’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-5’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-9’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-17’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-33’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ‘-65’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: narrowing conversion of ���-129’ from ‘int’ to ‘const uint8_t {aka const unsigned char}’ inside { } [-Wnarrowing] Documents/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:153:49: warning: large integer implicitly truncated to unsigned type [-Woverflow] exit status 1 Error compiling for board Arduino/Genuino 101.

RadJaz commented 8 years ago

The reason you're having issues compiling is that you're using a non-avr board and this library has some avr specific code. I was having the same issue with my adafruit feather m0 (arm) in issue #5. Luckily I found a fork of the library at pull request #6. It uses the SPI library so it should be cross platform and thus compile for your board. It compiled for mine.

slatedeer commented 8 years ago

Thank you so much for your help! I was still getting errors unfortunately, so I did some more searching and tried it again using an older IDE (1.5.6 r-2), and an Arduino Uno instead of a 101, and it worked.... So, the issue now is probably that I need to add the 101 to the list of boards for the Arduino 1.5.6 r-2, but there is no boards manager....if you happen to have any suggestions for that please let me know! Thanks again!

slatedeer commented 8 years ago

Hi, me again :) So, I abandoned the idea of using an older IDE (apparently the older IDEs do not support adding any new boards) and updated the library per pull request #6 as you suggested. It's now compiling just fine, but I'm getting the following message now: "Starting download script...SUCCESS: Sketch will execute in about 5 seconds." However, I've been sitting here staring at the screen and...no dice. :(

Do you have any suggestions??

Thanks so much again!

dhiltonp commented 8 years ago

I'm guessing you have a wiring problem. You could try crossing your current MISO/MOSI->DI/DO lines.

ladyada commented 4 years ago

refactored and fixed SPI - we now use busio.