Giter VIP home page Giter VIP logo

wsepd-androidthings's Introduction

Waveshare e-Paper Display module driver for Android Things

A very simple Waveshare eInk display module driver implementation for Android Things

preview

Download

dependencies {
    compile 'com.nilhcem.androidthings:driver-wsepd:0.0.2'
}

Usage

Tested on Waveshare 2.9inch e-Paper Module

// Access the EPD2X9 display
EPaperDisplay display;
EPaperDisplay.DeviceType epd2x9 = EPaperDisplay.DeviceType.Preset.EPD2X9.deviceType;
display = EPaperDisplay.Factory.create(SPI_NAME, BUSY_GPIO, RESET_GPIO, DC_GPIO, epd2x9);

// Clear screen
display.clear();

// Set pixels
byte[] rawPixels = SampleData.WAVESHARE_LOGO;
display.setPixels(rawPixels);

// Set a bitmap
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.android);
byte[] bmpPixels = BitmapHelper.bmpToBytes(bmp);
display.setPixels(bmpPixels);

// Refresh the screen
display.refresh();

// Close the display when finished
display.close();

Hardware connection

e-Paper Raspberry Pi 3
3.3V 3.3V
GND GND
DIN MOSI (#19)
CLK SCLK (#23)
CS CE0 (#24)
DC BCM25 (#22)
RST BCM17 (#11)
BUSY BCM24 (#18)

Kudos to

wsepd-androidthings's People

Contributors

david-fournier-smartnsoft avatar nilhcem avatar

Forkers

smartnsoft

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.