Home

Awesome

Ubuntu-x64 ubuntu-opengl basic-example scrolltest-example spitftbitmap-example

teensy st7735 linux stubs

experimental library for developing visual components for st7735 display...

structure

examples

installation

st7735_t3 class

> mkdir cmake-build-debug && cd cmake-build-debug && cmake -DCMAKE_BUILD_TYPE=Debug && sudo make install

opengl st7735 emulator

> cd extras/opengl && mkdir cmake-build-debug && cd cmake-build-debug && cmake -DCMAKE_BUILD_TYPE=Debug && sudo make install

usage

st7735_t3

find_package(teensy_st7735_linux_stubs)
include_directories(${teensy_st7735_linux_stubs_INCLUDE_DIR})
...
target_link_libraries(your_application ${teensy_st7735_linux_stubs_LIBS})
#include "ST7735_t3.h"

opengl st7735_t3

find_package(teensy_st7735_linux_opengl)
include_directories(${teensy_st7735_linux_extras_opengl_INCLUDE_DIR})
...
target_link_libraries(your_application ${teensy_st7735_linux_extras_opengl_LIBS})
#include "Arduino.h"          // from teensy-x86-stubs
#include "st7735_opengl.h"

st7735_opengl_noinput tft = st7735_opengl_noinput();

void testlines(uint16_t color) {
    tft.fillScreen(ST7735_BLACK);
    for (int16_t x=0; x < tft.width(); x+=6) {
        tft.drawLine(0, 0, x, tft.height()-1, color);
        delay(200);
    }
}

int main() {
    initialize_mock_arduino();
    testlines(ST7735_RED);
    
    // keep window open until user closes 
    while(!tft.shouldClose()) {
        tft.loop();
    }
}

dependencies

src

extras/opengl

> sudo apt-get install -yq libglfw3 libglfw3-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libx11-dev libxmu-dev libxi-dev libgl-dev libglew-dev
> brew install glfw
> brew install glew