Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharp Memory Display Not compiling for Arduino 101 #8

Closed
slatedeer opened this issue Mar 30, 2016 · 5 comments
Closed

Sharp Memory Display Not compiling for Arduino 101 #8

slatedeer opened this issue Mar 30, 2016 · 5 comments

Comments

@slatedeer
Copy link

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 ‘uint32_t* {aka long unsigned int_}’ to ‘volatile uint8_t_ {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 ‘uint32_t
{aka long unsigned int_}’ to ‘volatile uint8_t_ {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
Copy link

RadJaz commented Mar 31, 2016

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
Copy link
Author

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 slatedeer reopened this Apr 13, 2016
@slatedeer
Copy link
Author

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
Copy link

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

@ladyada
Copy link
Member

ladyada commented Jul 19, 2020

refactored and fixed SPI - we now use busio.

@ladyada ladyada closed this as completed Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants