Coder Social home page Coder Social logo

adafruit / adafruit_sharp_memory_display Goto Github PK

View Code? Open in Web Editor NEW
58.0 23.0 53.0 153 KB

This is an Arduino library for the Adafruit Monochrome SHARP Memory Displays

Home Page: http://www.adafruit.com/products/1393

License: Other

C++ 100.00%
arduino-library

adafruit_sharp_memory_display's Introduction

Adafruit SHARP Memory Display Build Status

This is the Adafruit SHARP Memory Display Arduino Library for Arduino

Tested and works great with the Adafruit SHARP Memory Display Breakout Board. Pick one up today in the adafruit shop! http://www.adafruit.com/products/1393

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Dependencies

These displays use SPI to communicate, 3 pins are required to
interface

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Documentation and doxygen

Documentation is produced by doxygen. Contributions should include documentation for any new code added.

Some examples of how to use doxygen can be found in these guide pages:

https://learn.adafruit.com/the-well-automated-arduino-library/doxygen

https://learn.adafruit.com/the-well-automated-arduino-library/doxygen-tips

Written by Limor Fried & Kevin Townsend for Adafruit Industries. BSD license, check license.txt for more information All text above, and the splash screen must be included in any redistribution

To install, use the Arduino Library Manager and search for "Adafruit SHARP Memory Display" and install the library.

adafruit_sharp_memory_display's People

Contributors

driverblock avatar evaherrada avatar hoffmannjan avatar ladyada avatar paintyourdragon avatar siddacious avatar tdicola avatar tyeth avatar winneymj avatar zacstewart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_sharp_memory_display's Issues

Recent changes result in screen rotation of 180 degrees.

The begin() method, Adafruit_SharpMem::begin(), contains the statement setRotation(2). This seemingly arbitrary statement had no effect originally, though, because rotation wasn't supported in drawPixel(). The recent changes to add this support, though, have caused the display on my project to undergo 180 degrees of rotation after updating this library.

Can we remove the setRotation(2) from begin(), perhaps?

I will be adding a setRotation(0) in my own code, regardless, as a workaround.

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

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.

Hardware SPI support

Adafruit_SSD1325 has the option to use hardware SPI while this library doesn't - which prevents from using a memory LCD with other SPI devices on the microcontroller SPI pins. Looking at pull requests it looks like other where trying to add that ( #6 ) but it wasn't merged.

Sharp Memory Display Not compiling for Arduino 101

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.

Not compiling for Feather M0+

When trying to compile for the Feather M0+ using the Arduino IDE, I get an error message:

Warning: platform.txt from core 'Adafruit SAMD Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core. /home/jaz/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp: In constructor 'Adafruit_SharpMem::Adafruit_SharpMem(uint8_t, uint8_t, uint8_t)': /home/jaz/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:64:15: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment clkport = portOutputRegister(digitalPinToPort(_clk)); ^ /home/jaz/Arduino/libraries/Adafruit_SHARP_Memory_Display/Adafruit_SharpMem.cpp:66:15: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment dataport = portOutputRegister(digitalPinToPort(_mosi)); ^ exit status 1 Error compiling.

I'd assume these lines that are inducing the error are some AVR specific stuff. I'm not sure though because I've had this library compile on a Teensy 3.2.

Add "clearBuffer" command to reduce screen flickering.

This is likely not an issue for everyone, but for me using the 400x240 display on a SAMD21 clearing the screen before every refresh makes it flicker. To keep it looking smooth I added a "clearBuffer" command that allows the user to write new data to the screen, without completely clearing it first.

//
/*!
@brief Clears the content of the write buffer.
*/
/
/
void Adafruit_SharpMem::clearBuffer() {
memset(sharpmem_buffer, 0xff, (WIDTH * HEIGHT) / 8);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.