GithubHelp home page GithubHelp logo

knowbie-dwg / u8g2-arm-linux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wuhanstudio/u8g2-arm-linux

0.0 0.0 0.0 25.32 MB

U8g2 for arm linux - a monochrome graphics library

Home Page: https://github.com/wuhanstudio/u8g2-arm-linux/wiki

License: Other

Shell 0.01% C++ 4.03% C 95.96% Makefile 0.01%

u8g2-arm-linux's Introduction

U8g2 for arm-linux

CircleCI

Quick Start

$ cd u8g2-arm-linux
$ make CC=gcc CXX=g++
$ ls bin/

Check wiki here for set-up

Introduction

U8g2 is a monochrome graphics library for embedded devices, and I ported it onto arm linux.

It should work fine on virtually all devices running linux with i2c, spi support, since no libraries pertaining to specific platforms has been used, yet you need to choose right compilers for your devices.

Todo list

[●] Hardware I2C
[●] Hardware SPI
[●] Software I2C
[●] Software SPI
[●] 8080 mode
[●] Add C++ wrapper
[●] Faster GPIO by tracking fd
[●] Better build system
[●] Upstream the port
[  ] Replace sysfs with gpiod
[  ] Benchmark

Gallery

Nanopi
http://wiki.friendlyarm.com/wiki/index.php/NanoPi

Nanopi


Nanopi

Nanopi NEO
http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO

Nanopi-Neo

Raspberry Pi ZERO
https://www.raspberrypi.org/products/raspberry-pi-zero/

Raspi-Zero

Raspberry Pi 2 B+
https://www.raspberrypi.org/products/raspberry-pi-2-model-b/

Raspi2-B+

Orange Pi ZERO
http://www.orangepi.org/orangepizero/

orangepi-zero

Lichee Pi NANO
http://nano.lichee.pro/

licheepi-nano

C-SKY
https://c-sky.github.io/docs/gx6605s.html

csky-ck610

How to compile

First, clone this repo:

$ git clone https://github.com/wuhanstudio/u8g2-arm-linux.git

$ cd u8g2-arm-linux

Change cross-compiler in Makefile under each example directory according to your board.

# Chosse proper compiler for your PI
# NanoPi:             arm-linux-gnueabi-gcc
# Raspberry Pi Zero:  arm-linux-gnueabi-gcc

# Raspberry Pi 2:     arm-linux-gnueabihf-gcc
# OrangePi Zero:      arm-linux-gnueabihf-gcc
# NanoPi NEO:         arm-linux-gnueabihf-gcc
# NanoPi NEO Plus 2:  arm-linux-gnueabihf-gcc
# C-SKY:              csky-linux-gcc	
CC = arm-linux-gnueabihf-gcc

For cross-compile:

arm-linux-gnueabi-gcc   for armv6  
arm-linux-gnueabihf-gcc for armv7

For native-compile (compile on your board), simply use:

CC = gcc

Finally, time to compile:

$ make

How to run

Before running, you can check your I2C graphic devices using i2c-tools:

$ sudo apt-get install i2c-tools

List your devices:

$ ls /dev/i2c*
/dev/i2c-0 /dev/i2c-1

Probe your devices on bus 0:

$ i2cdetect -y -r 0


For cross-compile, you can change ip address in Makefile:

# IP Address of your PI	
[email protected]

Then upload generated binary file onto your board:

$ make upload

Related Projects

Contact

u8g2-arm-linux's People

Contributors

wuhanstudio avatar

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.